You are here: Re: Adding hyperlinks to a table? « PHP SQL « IT news, forums, messages
Re: Adding hyperlinks to a table?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация