Search found 18 matches

by juulphp
Wed May 17, 2017 3:18 am
Forum: mySQL & php coding
Topic: php mysql login function
Replies: 3
Views: 1394

php mysql login function

I have a login script that retrieve data from the MySQL database. Now I want to work with features. For example, if a user has function = 1, he will see a different page than user 2 that has function = 2. Also, user 1 may not come on user 2 page two that is then protected. This is my checklogin.php:...
by juulphp
Wed Apr 12, 2017 5:57 am
Forum: PHP & MySQL Security
Topic: php session logout/login button
Replies: 1
Views: 1202

php session logout/login button

want to see if a user is not logged in can not see certain things on the website. If the user is logged the login button changes to logout. Or if a user is not logged in, can not see anything on the page, and if he is logged. I tried to session_start above but the entire page is protected and I do n...
by juulphp
Wed Mar 15, 2017 1:36 am
Forum: mySQL & php coding
Topic: get data from different tables
Replies: 11
Views: 1817

Re: get data from different tables

It works, thanks for the answers!
by juulphp
Tue Mar 14, 2017 11:59 am
Forum: mySQL & php coding
Topic: get data from different tables
Replies: 11
Views: 1817

Re: get data from different tables

Your code is not quite right. For users.id = review.userid. So I did it like this: SELECT users.id, users.firstname, users.lastname, review.id, review.itemid, review.userid, review.rnumber, review.review, review.viewed, entertaiment.id, entertaiment.title FROM review INNER JOIN users ON users.id = r...
by juulphp
Tue Mar 14, 2017 6:08 am
Forum: mySQL & php coding
Topic: get data from different tables
Replies: 11
Views: 1817

Re: get data from different tables

Because the site: sqlfiddle.com didn't work. I get an error: Table 'db_9_bcbf0b.users' doesn't exist.
by juulphp
Tue Mar 14, 2017 5:33 am
Forum: mySQL & php coding
Topic: get data from different tables
Replies: 11
Views: 1817

Re: get data from different tables

I have done the sql query in PhpMyAdmin.
by juulphp
Tue Mar 14, 2017 4:33 am
Forum: mySQL & php coding
Topic: get data from different tables
Replies: 11
Views: 1817

Re: get data from different tables

I had reversed the column name and table name. This is now my query: SELECT users.id, users.firstname, users.lastname, review.id, review.itemid, review.rnumber, review.review, review.viewed, entertaiment.id, entertaiment.title FROM users JOIN review, entertaiment WHERE users.id = review.id AND revie...
by juulphp
Tue Mar 14, 2017 3:38 am
Forum: mySQL & php coding
Topic: get data from different tables
Replies: 11
Views: 1817

Re: get data from different tables

I have got now this: SELECT id.users, firstname.users, lastname.users, id.review, itemid.review, rnumber.review, review.review, viewed.review, id.entertaiment, title.entertaiment FROM users JOIN review, entertaiment WHERE id.users = id.review AND itemid.review = id.entertaiment AND id.users = '12' B...
by juulphp
Mon Mar 13, 2017 10:10 am
Forum: mySQL & php coding
Topic: get data from different tables
Replies: 11
Views: 1817

get data from different tables

I want to get data from some different tables. This is the situation: I have an table: users with an user_id I have an table: movie with an title, img and more and also an movie_id. I have an table: reviews with an review_id, the user_id and the movie_id I want to show the review from an specific us...
by juulphp
Wed Feb 15, 2017 6:22 am
Forum: mySQL & php coding
Topic: PHP Mysqli result filter
Replies: 7
Views: 1347

Re: PHP Mysqli result filter

When I click on the link of movies that I get all the results from the database type movie. When I click on the link of music that I see all results with the type of music from the database on the index page.
by juulphp
Wed Feb 15, 2017 5:06 am
Forum: mySQL & php coding
Topic: PHP Mysqli result filter
Replies: 7
Views: 1347

Re: PHP Mysqli result filter

That's my question. I want the results on the index page.
by juulphp
Wed Feb 15, 2017 4:20 am
Forum: mySQL & php coding
Topic: PHP Mysqli result filter
Replies: 7
Views: 1347

Re: PHP Mysqli result filter

I understand, I just want links. <a href="index.php"> Movie> where SQL only type = movie. And then <a href="index.php"> Music> type = music in the SQL.
by juulphp
Wed Feb 15, 2017 2:39 am
Forum: mySQL & php coding
Topic: PHP Mysqli result filter
Replies: 7
Views: 1347

PHP Mysqli result filter

I want an PHP Mysqli filter. When the user click on the link :<a href="index.php#showmovie">Movie> Only the results with the type = movie from mysqli shows. How can i get this worked? This is my code for show data: <?php $result = mysqli_query($mysqli, "SELECT * FROM entertaiment ORDER BY id DESC LI...
by juulphp
Sun Feb 05, 2017 4:34 am
Forum: PHP Scripts
Topic: Get data from API url XML php
Replies: 1
Views: 1052

Get data from API url XML php

Hello, I've got the problem to get data from an API url in XML en PHP. This is my code: <?php $enter = $_GET["enter"]; $content = file_get_contents("https://www.omdbapi.com/?s=$enter&r=xml"); $xml = simplexml_load_string($content); if($xml) { echo "<h2>" .$xml->title. "</h2>"; } else { echo "Nothing...
by juulphp
Wed Jan 25, 2017 10:47 am
Forum: JavaScript
Topic: javascript data mysql database
Replies: 5
Views: 1418

Re: javascript data mysql database

Its works. Thanks for the answers!
by juulphp
Tue Jan 24, 2017 2:02 pm
Forum: JavaScript
Topic: javascript data mysql database
Replies: 5
Views: 1418

Re: javascript data mysql database

It works now! I had in the form.php mysqli_real_escape_string and that I removed which it does now. I only fielding multiple text with the same IDs. How do I get all of that in one row. Now it only shows the first input field.
by juulphp
Tue Jan 24, 2017 10:23 am
Forum: JavaScript
Topic: javascript data mysql database
Replies: 5
Views: 1418

Re: javascript data mysql database

This is now my code: var ele = new Array(); $("#btn1").click(function(){ $('.tekst').each(function(){ $('.nummer').each(function(){ ele.push($(this).val()); }); }); var tekst= $("#tekst").val(); var titel= $("#titel").val(); var send = ele.join(',') request = $.ajax({ url: "form.php", type: "post", ...
by juulphp
Tue Jan 24, 2017 6:12 am
Forum: JavaScript
Topic: javascript data mysql database
Replies: 5
Views: 1418

javascript data mysql database

I made a site to fill things in on an form. I have two buttons to get an extra form field on the screen. I want to save the data using the exact same markup somewhere. This is the code for getting the data: <script> $(document).ready(function(){ $("#btn").click(function(){ $(".div2").append("<div cl...