Re: hyperlinking results from a sql query
| From: | Awlad Hussain | Date: | Thu, 01 May 2003 12:42:56 +0000 |
| Subject: | Re: hyperlinking results from a sql query | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145935@lists.php.net to get a copy of this message | ||
$result = mysql_query("YOUR_SQL_QUERY_HERE");
while($row=mysql_fetch_array($result){
echo "<a href="page.php?id=$row[id]">$row[name]</a><BR>";
echo "$row[phonenumber]<BR>";
}
-awlad
----- Original Message -----
From: "bob pilly" <bobpilly@yahoo.co.uk>
To: <php-general@lists.php.net>
Sent: Thursday, May 01, 2003 1:30 PM
Subject: [PHP] hyperlinking results from a sql query
> Hello all, im having problems trying to implement this
> and hope someone can help?
>
> i have written a page that outputs the multiple
> results of a query under column headings, e.g
>
> name phonenumber
> test 1231231231
> test2 123123123
>
> I want to be able to make the name part of every row
> of output a hyperlink that will take the user to
> another page and also pass the name field contents as
> a varaible to that new page. Any ideas onhow to do
> this?
>
> Thanks for any help in advance!
>
> __________________________________________________
> Yahoo! Plus
> For a better Internet experience
> http://www.yahoo.co.uk/btoffer
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>