Hi,
I would like to include on click event in the below PHP code.
The below PHP code will retrieve products data from MYSQL database into a table. and I have a sub-products in the next page which is also retreive from database.
I need help when I click on product on page1 the same product as to pass as a parameter to the next page which will be input for the query for sub-products on page2.
Can you please help how to use on Click event in the below PHP code.
<?php
session_start ();
$con = mysql_connect('localhost','root','xxxxxx');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db", $con);
$result_product = mysql_query("SELECT * FROM products where product_no between 133 and 171 order by product_no");
echo "<table border='0'>";
$lenproduct = mysql_num_rows($result_product);
$maxLen = 0;
echo "<tr>";
echo "<th align ='left'>" . 'PRODUCTS LIST' . "</th>";
echo "</tr>";
$productCount =0;
$row_product = mysql_fetch_array($result_product);
while( $productCount <= $lenproduct)
{
$row_product = mysql_fetch_array($result_product);
echo "<td>";
echo $row_product['HYPERLINK'] . $row_product['MAIN_PRODUCT'];
echo "</a></td> </tr>";
$productCount = $productCount + 1;
}
echo "</table>";
?>
Thanks a lot in Advance....!
Thanks,
Srinivas
I would like to include on click event in the below PHP code.
The below PHP code will retrieve products data from MYSQL database into a table. and I have a sub-products in the next page which is also retreive from database.
I need help when I click on product on page1 the same product as to pass as a parameter to the next page which will be input for the query for sub-products on page2.
Can you please help how to use on Click event in the below PHP code.
<?php
session_start ();
$con = mysql_connect('localhost','root','xxxxxx');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db", $con);
$result_product = mysql_query("SELECT * FROM products where product_no between 133 and 171 order by product_no");
echo "<table border='0'>";
$lenproduct = mysql_num_rows($result_product);
$maxLen = 0;
echo "<tr>";
echo "<th align ='left'>" . 'PRODUCTS LIST' . "</th>";
echo "</tr>";
$productCount =0;
$row_product = mysql_fetch_array($result_product);
while( $productCount <= $lenproduct)
{
$row_product = mysql_fetch_array($result_product);
echo "<td>";
echo $row_product['HYPERLINK'] . $row_product['MAIN_PRODUCT'];
echo "</a></td> </tr>";
$productCount = $productCount + 1;
}
echo "</table>";
?>
Thanks a lot in Advance....!
Thanks,
Srinivas