PHP w/ MySQL and a "?"
| From: | Jay | Date: | Thu, 10 Aug 2000 02:12:44 +0000 |
| Subject: | PHP w/ MySQL and a "?" | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11024@lists.php.net to get a copy of this message | ||
Hey all,
I am very new at PHP and I was wondering something. I know this is probably
really basic.
I setup a database in MySQL, I can connect and then pull data. This is my
code:
<?
$server="localhost";
$username="nurck";
$password="------";
$database="------";
$table="-----";
@mysql_connect($server, $username, $password) or die("Connection");
@mysql_select_db($database) or die("Database");
$Result=mysql_query("SELECT * FROM $table");
while($row = mysql_fetch_array($Result))
{
$id = $row["ID"];
$title = $row["title"];
echo "<font face=arial size=2>$id $title</font><br>";
}
?>
Now, that displays all the data in the table.
What I want to do is, in the address bar of IE or NN, have someone type in
"www.whatever.com/hardware.php3?id=1" and have it send out just that row data, not the
entire table. Like how Zend or other sites are setup using a database.
Thanks for any help!
Jay Stauffer