I am a complete newbie to PHP and MySQL but I am trying to learn. I am trying to figure out how to keep all of the info in my table from displaying. Here is my example:
Here is the link I would give:
http://www.hightidemedia.net/v7/clientid.php?id=obh
But if i just type in
http://www.hightidemedia.net/v7/clientid.php
It lists all of the info in the table. How do I keep this from happening?
Here is the code I use to query the database:
<?php
mysql_connect (localhost, ******, ********);
mysql_select_db (******);
if ($id == "")
{$id = '%';}
$result = mysql_query ("SELECT * FROM client
WHERE id LIKE '%$id%'
");
if ($row = mysql_fetch_array($result)) {
do {
Print $row["company"];
print (" ");
print ("<br>");
print ("<p>");
print $row["pic"];
print ("<p>");
print $row["url"];
print ("<br>");
} while($row = mysql_fetch_array($result));
} else {print "Oops! Either I made a mistake, or you did!";}
?>

