Jump to content

[SOLVED] Simple Query


steveangelis

Recommended Posts

I know the answer is something simple but I cannot figure it out:

 

<?PHP
$ip = $_POST['ip'];
echo $ip;
include('config.php');
$linkid = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd");
mysql_select_db("$dbname", $linkid);

$result = mysql_query('SELECT ip, username FROM phpbb_ip where ip="$ip"'); 
while($row = mysql_fetch_array($result)) 
{ 
echo $row['ip']." - - - - - - - - ".$row['username'];
} 
?>
<form action="ipsearch.php" method="post"><input name="ip" type="text" />
<input name="Submit" type="submit" /></form>

 

I have done and mysql_error and I figured out that it is coming up with a blank and empty query, but I KNOW the database it is coming from is correct.  Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/118184-solved-simple-query/
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.