ParkerShannon Posted August 31, 2019 Share Posted August 31, 2019 WTF is wrong with this php code? I run this and nothing (see below for image of MySQL SQL results). <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>TITLE</title> <meta name="author" content="Parker Shannon"> </head> <body> <!--?php // Declare Connection Variables $servername = "mysql408.discountasp.net"; $username = "0140496peoplesp"; $password = "uhuhuhuhuhu"; $dbname = "MYSQL5_1014730_peoplespoll"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); echo "Connected"; // Select items from table $row = "SELECT id, issue FROM question WHERE id=1; $result = mysqli_query($conn, $row) echo "id: " . $result["id"] . "Issue: " . $result["issue"] . ; // Close database mysqli_close($conn); echo "Disconnected"; ?> </body> Link to comment Share on other sites More sharing options...
dsonesuk Posted August 31, 2019 Share Posted August 31, 2019 3 hours ago, ParkerShannon said: $result["issue"] . ; Remove '.' Before semicolon Link to comment Share on other sites More sharing options...
ParkerShannon Posted September 1, 2019 Author Share Posted September 1, 2019 Thank you for your response, but that wasn't it. Link to comment Share on other sites More sharing options...
Ingolme Posted September 1, 2019 Share Posted September 1, 2019 You're also missing a semicolon ; at the end of this line: $result = mysqli_query($conn, $row) It seems like errors are disabled on your server, if you had them enabled the server would tell you exactly on which line the script stopped and why. While developing, you can add the following code to the beginning of your file to make sure error messages are displayed instead of a blank screen. <?php ini_set('display_errors', 1); error_reporting(E_ALL); Link to comment Share on other sites More sharing options...
ParkerShannon Posted September 2, 2019 Author Share Posted September 2, 2019 (edited) I'm using the wrong editor. Downloaded DreamWeaver and I'm all set. I really appreciate you guys wading in. Edited September 2, 2019 by ParkerShannon Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now