Jump to content


  • Posts

  • Joined

  • Last visited

JJ_ceo's Achievements


Newbie (1/7)



  1. It's Working NOW!! I was just looking and I forgot a curly bracket.
  2. Thanks for the help, but now the $_GET command is not working too. This is what I have so far, <?php $con=mysqli_connect("host","username_table.access.name","Password","username_table.name"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } //This Part HERE IS NOT WORKING! $result = mysqli_query($con,"SELECT * FROM games WHERE id='$_GET["id"]'"); // / The part above is not working. while($row = mysqli_fetch_array($result)) $name = $row['name']; $price = $row['price']; $sdes = $row['short_des']; $ldes = $row['long_des']; $img = $row['img']; $img1 = $row['eximg1']; $img2 = $row['eximg2']; $img3 = $row['eximg3']; $img4 = $row['eximg4']; $video = $row['video']; ?>
  3. Ok so I have been looking for how to do this all day(Very long time) and I can't find it anywhere. What I am trying to do is power my website with what I call URL variables the things that YouTube uses E.G. Page.php?video=1 but when it comes to selecting data from my database I have an issue. I have a table for ID and some others I will call them EX1 to EX5, what I am trying to do is the URL "?" thing says a number and that number is turned into a variable(don't know how) but that variable indicates the ID, but I don't want to put the ID on the page, I want the ID to tell my PHP code where in the tables the EX1 - EX5 are, so they can become a variable for later use on the page. Sum up. PHP takes the URL?name=1 turns into variable(1) - variable indicates where in the columns to look LOOKS UNDER ID finds 1 - now it needs to make the EX1 - EX5 in the same column into variables. ID EX1 EX2..... 1 I don't know how to do this can anyone help me?
  • Create New...