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
catalog help beginner
Moderator: General Moderators
- faisalzafar
- Forum Newbie
- Posts: 3
- Joined: Wed Sep 08, 2004 6:27 am
- Location: Lahore Pakistan
- Contact:
solution of ur problem
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: </b><?php print($row1->UID);?></td>
</tr>
<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: </b><?php print($row1->UID);?></td>
</tr>