|
Posted by J.O. Aho on 11/18/05 17:51
Sam wrote:
> Hello!
>
> I've been dabbling with PHP and MYSQL over the last month or so. I like
> it! However, I'm stumped and hope you guys 'n' gals can give me some
> advice.
>
> I can visualise what I want to achive but don't know how complex, (or
> easy :o), this will be to do in practice.
>
> * I have a simple MySQL database containing User ID, Country, Postcode
> and Date.
>
> * I extract this information and display it in a table, depending on
> which user is logged in. (I use sessions). Typically, there will be 4
> or 5 rows of data displayed for each user.
>
> I want to have an image, (a button), displayed alongside each row which
> the user can click on to select that row.
>
> When clicked, this button should take the User ID and Postcode for it's
> row and pass this to another PHP function.
<?php echo "<a href='http://$url_to_page?ID=$id&Zip=$postcode&'><img
src='images/ugglypicture.png' border='0'></a>"; ?>
You need to set the $url_to_page to which page to load and $id needs to be set
to the user id while $postcode needs to be set to the post code.
Of course you could store the values needed in the session and just have a
simple link.
//Aho
Navigation:
[Reply to this message]
|