link to php script with pre-defined variable
Posted: Wed Jul 03, 2002 6:14 pm
im using a search script that comes up with a whole mess of results according to which genre you select. each result has an image, and each image has a hyperlink. what i would like to do is make this hyperlink execute a php script (which is generic and will be used for all hyperlinks) that shows the selected result by itself, and in more detial. what kind of variables do i need to define and in which scripts?? here is the search script:
this is the loop that is repeated a controlled number of times. where all the ?'s are is obviously where i need to link to the php script, but i left it as ?'s becuase i dont know what i should name it yet. each item has its uniuqe 'id' number and 'image' number from the table, so one of these would be the best variable to define what video i want the script to look for. this is the script that i want it to link to (for now its named 'backcover.php):
any ideas?? again, i want the hyperlink in the first script to somehow link to the second script and dredge up results to the specific title's image that was clicked. all the script is there, im pretty sure i just need to define a few variables and rename the second script. anyways, please let me know what steps i should take. thank you.
Code: Select all
<?php
echo "<table width="100%" border="0" cellspacing="0" cellpadding="0">\n"; // begin master table
echo "<tr>\n"; // begin master table's one and only row
do {// start while loop
$image = $row_Recordset1ї'image']; // define image number for each loop
if($genre = "comedy")
{ // start if loop
echo "<td>\n"; // begin master table column to be repeated by loop
echo "<table width="100%" border="0" cellspacing="0">\n"; //begin sub-table
echo "<tr>\n"; // start sub-table row 1
echo "<A href=??????????><div align="center"><IMG SRC=images/$image.jpg></A></div>\n"; // insert dynamic image
echo "<br><div align="center">".$row_Recordset1ї'title']."</div>\n"; // insert dynamic title
echo "<br><div align="center">".$row_Recordset1ї'format']."</div>\n"; // insert dynamic format
echo "</table>\n"; // end sub-table
echo "</td>\n"; //end master table column
}
}
while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>Code: Select all
<?php
$image = $row_Recordset2ї'image'];
echo "<table width="100%" border="0" cellspacing="0">\n"; //begin table
echo "<tr>\n"; // start table row
echo "<div align="center"><IMG SRC=backs/$image.jpg></div>\n"; // insert dynamic image
echo "<br><div align="center">".$row_Recordset2ї'title']."</div>\n"; // insert dynamic title
echo "<br><div align="center">".$row_Recordset2ї'actors']."</div>\n"; // insert dynamic actors
echo "<br><div align="center">".$row_Recordset2ї'description']."</div>\n"; // insert dynamic description
echo "</tr>"; // end table row
echo "</table>\n"; // end table
?>