Re: how to put links (to another page) behind records in a table
| From: | olinux | Date: | Tue, 16 Oct 2001 05:32:41 +0000 |
| Subject: | Re: how to put links (to another page) behind records in a table | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13349@lists.php.net to get a copy of this message | ||
Create the link inside of your while loop
while (blah) {
$row = mysql_fetch_array($result)
...
...
$html .= "
<TR><TD>$movie_title</TD><TD><a
href=\"http://..\forms\view_edit_movie_form?ID=$ID\">view
details</a></TD></TR>";
// END while loop
}
Make sure to use .= and not = otherwise you'll just
end up with the last piece
--- Sander Peters <S.Peters@Visionnet.nl> wrote:
> Hello,
>
> I'm displaying a table with records and with <prev>
> and <next> buttons.
> This table shows a list movies that I own.
> I want to make a link after each movie so that the
> user can see the
> details from that movie.
> Like this: (for example)
>
> ID Titel
> 1 movietitel1 view details
> 2 movietitel2 view details
>
> I have a idea how to do that, it should be something
> like this:
>
> print("<TD><a
>
href=\"http://..\forms\view_edit_movie_form?ID=$ID\">view
> details</TD>");
>
> The only problem is, that I should take again the
> variable out of the
> query ID that I made earlier in my script.
> The tabel is made in a While Loop, so I don't know
> how to get a "fresh"
> ID nr from the query in the Loop.
>
> I hoop you understand me!
> Thanks in advance for your answer
>
>
>
>
> --
> Met vriendelijke groet / With Greetings,
>
> Sander Peters
>
> site: http://www.visionnet.nl/
> email: mailto:s.peters@visionnet.nl
> webmail: mailto:sanderpeters@yahoo.com
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-db-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-db-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com