catalog help beginner

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bluesage
Forum Newbie
Posts: 1
Joined: Wed Sep 08, 2004 10:26 pm

catalog help beginner

Post 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
User avatar
faisalzafar
Forum Newbie
Posts: 3
Joined: Wed Sep 08, 2004 6:27 am
Location: Lahore Pakistan
Contact:

solution of ur problem

Post 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>
Post Reply