Page 1 of 1

catalog help beginner

Posted: Wed Sep 08, 2004 10:30 pm
by bluesage
hi

heres what i plan on doing:

i have a page with dvds to rent, below each movie is the name of the movie which is also a link. when the user clicks the link it opens a new window with details about that movie.

my problem is i don't know how to do that. how to make it so when the user clicks for example on a link named "van helsing" it creates an sql query searching for all info about vanhelsing in my database and then opens the new page with that information.

can anyone give me some sample code to work with.

i dont understand how to use the action property: ...file.php?action=...

thanks

solution of ur problem

Posted: Thu Sep 09, 2004 1:38 am
by faisalzafar
when u click on the 'van helsing' it will like link as

<a href=2ndpage.php?fileid=<?php print($row->ID);?>

2ndpage.php

<?php
$strQRY="SELECT * FROM UserInfo WHERE UID = $fileid";
$nResult1 =mysql_query($strQRY);
if (mysql_num_rows($nResult1)>=1){
$row1=mysql_fetch_object($nResult1);
}
?>
<tr><td width="259" height="10"></td></tr>
<tr>
<td><b>User ID:&nbsp; </b><?php print($row1->UID);?></td>
</tr>