ngreenwood6 Posted November 3, 2008 Share Posted November 3, 2008 Does anybody see anything wrong with this code? It is not displaying the results but I know the data exists in the database. <?php //include the variables include("vars.php"); //get the type of tutorial $type = $_GET['type']; //connect to the database $connect = mysql_connect($host, $db_user, $db_pass); //select the database $select = mysql_select_db($db); //make the query $query = "SELECT * FROM $db_table WHERE type='$type'"; $results = mysql_query($query); //display the results while($row = mysql_fetch_array($results)); { $username = $row['username']; $title = $row['title']; $text = $row['text']; echo "<table><tr><td>This was posted by $username</td></tr>"; echo "<tr><td><b>$title<b></td></tr>"; echo "<tr><td>$text</td></tr>"; } ?> Link to comment https://forums.phpfreaks.com/topic/131197-solved-help/ Share on other sites More sharing options...
ngreenwood6 Posted November 3, 2008 Author Share Posted November 3, 2008 Nevermind just figured out I am an idiot and added an extra ; Link to comment https://forums.phpfreaks.com/topic/131197-solved-help/#findComment-681150 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.