Jump to content

Nothing showing up?


3raser

Recommended Posts

 

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"); ?>

Link to comment
https://forums.phpfreaks.com/topic/182545-nothing-showing-up/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.