Take out one Data and show it in page
| From: | Naga Sean | Date: | Thu, 29 Mar 2001 03:23:13 +0000 |
| Subject: | Take out one Data and show it in page | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-7954@lists.php.net to get a copy of this message | ||
I had a question here.
How to pull up one database, and then view that row
what I mean here is
NO NAME AGE
1 JOHN 12
2 RYAN 23
3 JIM 42
I want to take JOHN out from database using URL
www.example.com/template.php?name=JOHN
here is my coding so far, and I know it's wrong, But will make you guys had the idea what I
want to do.
Thanks
-----------------------------------
<?php
$db = mysql_connect("localhost", "user","pass");
mysql_select_db("media",$db);
$result = mysql_query("SELECT nickname,name FROM database WHERE $myrow[2]=$name",$db);
$myrow = mysql_fetch_row($result);
?>
Your name $myrow[name], $myrow[age]
_____________________________________________________________
www.kaskus.com - FREE EMAIL SERVICE