[SOLVED] View.php?id=x show it....
Posted: Fri Dec 19, 2003 9:29 pm
ok i've just been making a small guestbook script thing and i've done a basic template for the front page and inserted data via mysql. It works:
http://www.tcwonline.org/~dale/guestbook/
Now the view link wont work though. Now how would i do this:
Go here:
http://www.blah.com/view.php?id=1
... and it shows me what ever the database has as ID 1?
Im connecting and reading info using this:
http://www.tcwonline.org/~dale/guestbook/
Now the view link wont work though. Now how would i do this:
Go here:
http://www.blah.com/view.php?id=1
... and it shows me what ever the database has as ID 1?
Im connecting and reading info using this:
Code: Select all
<?
mysql_pconnect("localhost","username","password");
mysql_select_db("db");
$result = mysql_query("select * from guestbook");
while($r=mysql_fetch_array($result))
{
$id=$rї"id"];
$title=$rї"title"];
$msg=$rї"msg"];
$author=$rї"author"];
$email=$rї"email"];
$date=$rї"date"];
echo "WHATEVER I WANNA ECHO";
}
?>