I'm reading data from my DB and displaying it in a table like this
while($row = mysql_fetch_row($result)){
$_SESSION['edit'] = $row[1];//it says undefined index 'edit'
echo '</tr>';
echo ' <td class="product"><a href="manage-products-2.php?prod_id ='.$row[0].'">'.$row[1].'</a></td>';//it says undefined index 'prod_id'
echo'<td class="quantity">'.$row[5].'</td>';
echo '<td class="item_price">'.$row[4].'</td>';
echo '<td class="item_total">'.$row[6].'</td>';
echo '<td class="item_unsold"><a href = "manage-products.php?prod ='.$row[0].'" style="color:red" onclick="return confirm("Are you sure you want to delete this product ?")">Delete</a></td>';//to delete an item
echo '</tr>';
}
On a separate script called manage-products2.php, i'm retrieving these values like this:
$edit = $_SESSION['edit'];
$prodid = $_GET['prod_id'];
But then i get the errors: undefined index 'edit' and undefined index 'prod_id' when i try to display these values like this for example <?php echo '<div class="question2 ha">'.$prodid.'</div>';?>
. Please where is my mistake?. Thank You.