am getting this error after executing the select query.
Notice: Undefined index: unit8_code in C:\wamp\www\ELIZA\viewresults.php on line 129
the following is line 129
$unit8_code=$row;
please help to troubleshoot
am getting this error after executing the select query.
Notice: Undefined index: unit8_code in C:\wamp\www\ELIZA\viewresults.php on line 129
the following is line 129
$unit8_code=$row;
please help to troubleshoot
Short note: this was resolved when the database column name was corrected — thanks to for spotting that and to for confirming the fix.
Quick checklist for anyone who hits a similar "undefined index" when reading query results:
DESCRIBE / SHOW COLUMNS to inspect table structure (see SHOW COLUMNS / DESCRIBE).if (isset($row['unit8_code'])) {
$value = $row['unit8_code'];
} else {
$value = null; // handle missing value
} Enabling full error reporting on development systems helps catch typos quickly.
Jump to Post— mahavir123 1$row;
May be there is no column name as 'unit8_code' in your table;
$row;
May be there is no column name as 'unit8_code' in your table;
thank you very much the problem was on the database the column name was refernced wrongly
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.