Hi everyone, i am building book store, i am thinking about to create a single page who fetch a record from MYSQL on the basis of Book_ID instead of create each product detail page. when some click on detail button it passes book_id to another page where i write a function which get book detail on basis of book_id and show this information through html. i use form submit button to pass book_id to another page. but when i set value in submit button is shows book_id on the page instead of detail. there another way to complete my target ???
here is the code but it is not working as i required.
$con = mysql_connect(server , userName , password ) or die('DataBase cannot connect. Reason: ' . mysql_errno());
mysql_select_db('tnc') or die('Table cannot connect. ' . mysql_errno());
$sql = "SELECT * From publications
WHERE Title LIKE '%Sales Tax Act%'
order by Amended DESC
LIMIT $gid, $imgPerPage;";
$result = mysql_query($sql, $con) or die('Query Error. ' . mysql_errno());
while($row = mysql_fetch_array($result))
{
$output = "<div id='bookContainer'>";
$output .= "<div id='bookImg'><img src='".$row["imgUrl"]."'/> </div>";
$output .= "<div id='bookTitle'>" . $row["Title"] . "</div>";
$output .= "<div id='bookInfo'> Emended Upto ". $row["Amended"] ."</div>";
$output .= "<div id='bookPrice'> Price: Rs. " . $row["Price"] . "</div>";
$output .= "<div id='bookDetail'><form action='adminScripts/getBookDetail.php' method='post'><input type='submit' value='Detail' name='" . $row["Book_ID"] ."' /></form></div>";
$output .= "</div>";
$output .= "<hr />";
echo ($output);
}