my php pages:
center.php display information of the book
Left.php is a list of books.
When you click a list-> center.php will display all the books from the database the user has selected books.
main.php is the main page.
It will include the page left.php, center.php.
The problem is how to pass parameters from Left.php to center.php
If I have a main.php page, my list:
Code: Select all
echo "<td><a href='main.php?type=1'>novel</a><br><a href='main.php?type=2'>magazine</a><br></td>"
Code: Select all
$ type = $_REQUEST["type"];
$sql = "select idbook, name, type, cost from BOOK where type = '$type'"
$result = mysql_query ($sql);
echo "<table border=1>";
while($row=mysql_fetch_array($ result))
{
//display information
echo "<tr>";
echo "<td>$row[1]....</td>";
}
And then displays the information of the book to center.php
thanks