if ($resultdetails == FALSE) {
$querynewid = "select * from customer_det order by ID desc limit 1";
$resultnewid = mysql_query($querynewid);
while ($row=mysql_fetch_row($resultnewid)) {
$uid = $row['id'];
echo $uid;
}
}
Is this a valid nested statement to make? It won’t echo $uid for some reason?
You should use
mysql_fetch_associnstead ofmysql_fetch_row. The last one returns a numerical indexed-array, soidis not a key in that result set.mysql_fetch_assocreturns an associative array, so the field name is also the name of the key. By the look of your code, that is what you want.See the difference here and here.