Re: how capture a parameter from a hyperlink and then pass it to the next
| From: | David Robley | Date: | Tue, 21 Nov 2000 00:03:18 +0000 |
| Subject: | Re: how capture a parameter from a hyperlink and then pass it to the next | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26358@lists.php.net to get a copy of this message | ||
On Tue, 21 Nov 2000, Stinie Steinbach wrote:
> I am trying to passing a parameter to my PHP program when the user
> clicks on a hyperlink. I have tried syntax like:
>
> <td><a
>
> href=\"update.php3?id=$id\">$id<small>edit</small></a></td>
>
> if ik klik on the link is see the variable in the hyperlink and i can
> open the right file the only problem i have is that i loos the variables
> right on my way. . .
>
> does somone know what i do wrong???
> thanks :-) cf
Unless you are echoing that line, you will see the variable's name in the
link, not it's value. Do something like
echo "<td><a
href=\"update.php3?id=$id\">$id<small>edit</small></a></td>";
and assuming that a value has been assigned to $id it should show up in the
link. You may need to use urlencode on the variable being passed.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA