3raser Posted November 22, 2009 Share Posted November 22, 2009 Why isn't anything showing up? http://domination.comyr.com/progress/search_input.php (The search by name feature) <?php require "global_navigation.php"; ?> <?php $id = $_POST['id']; $name = $_POST['username']; //connect to database $connect = mysql_connect("$dbhost","$dbuser","$dbpassword") or die("Connection failed!"); mysql_select_db("$db") or die("Database fail!"); //extract $extract = mysql_query("SELECT * FROM posts WHERE name='$name'"); $numrows = mysql_num_rows($extract); while ($row = mysql_fetch_assoc($extract)) { $construct = "SELECT * FROM posts WHERE name='$name'"; $run = mysql_query($construct); $foundnum = (mysql_num_rows($run)); if ($foundnum ==0) { echo "This user hasn't posted!"; } $id = $row[id]; $message = $row[message]; echo "<hr><font face='arial' size='3'><center>($id) Posted by: <b>$name</b></img><br><br><b>$message</b><br /><br /></center><hr>"; } ?><?php require("global_footer.php"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/182545-nothing-showing-up/ Share on other sites More sharing options...
3raser Posted November 22, 2009 Author Share Posted November 22, 2009 Bump Quote Link to comment https://forums.phpfreaks.com/topic/182545-nothing-showing-up/#findComment-963505 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.