Please check the attached image first...
There you will find a list of products with their details. I want to delete the selected product (checked with checkbox).
I know, I will be successful if I manage to give the prod_id on the click of delete.
But on adding prod_id , it give me the error
Notice: Undefined variable: prod_id in C:\wamp\www\test\edit.php on line 55
My code is
[ php]
<?php
$con = mysql_connect("localhost","XXX","XXXXXXXXX");
$db = mysql_select_db("test",$con);
$select = mysql_query("select * from test_data");
echo "<table border='0' cellpadding='4' cellspacing='0' align='center' width='96%'>
<tr bgcolor='#24a1b6' class='whitetext'>
<td> </td>
<td>Name</td>
<td>Code</td>
<td>Type</td>
<td>Hotel Location</td>
</tr>";
while($result = mysql_fetch_array($select))
{
$prod_name = $result['prod_name'];
$prod_Code = $result['prod_Code'];
$prod_type = $result['prod_type'];
$prod_location = $result['prod_location'];
echo "<tr class='black'>
<td><input class='none' value='prod_id' name='prod_id' type='checkbox'></td>
<td>$prod_name</td>
<td>$prod_Code</td>
<td>$prod_type</td>
<td>$prod_location</td>
<td align='center'><A href='delete.php?prod_id=$prod_id' class='black'>DELETE</A></td>
<td align='right'><A href='update.php' class='black'>UPDATE</A></td>
</tr>";
}
echo "</table>";
?>
[ /php]
Pleaseeee, help me......