Hi,
I am trying to get the primary key (which is number) from a field of the same table. however i encountered "Undefined index" shown on my screen.
$orange_insert = "INSERT INTO orange (orange_id, orange_name, orange_add)
VALUES (NULL, '$val_name', '$val_add')";
$result = mysql_query($orange_insert) or die (mysql_error());
$orange_sel = "SELECT *
FROM orange";
$result_orgsel = mysql_query($orange_sel) or die (mysql_error());
$row = mysql_fetch_array($result_orgsel);
$result_orange = $row['$orange_id'];
echo $result_orange;
can anyone assist me thru my code if i have done some terrible mistake here. Thank you so much.