patrickm Posted January 23, 2008 Share Posted January 23, 2008 I've build an admin section to a website where products are presented. The admin page allows the logged in user to change/adapt certain values of a selected product. Although the website/admin page is working without any problem, I come across error messages in the Apache/httpd logfiles: [Wed Jan 23 16:14:45 2008] [error] [client 83.247.125.49] PHP Notice: Undefined property: stdClass::$titel in /home/web/######/admin/admin-artikel-gegevens.php on line 83, referer: http://www.######.com/admin/admin.php The code the error message is referring to: if ($actie == ""){ include("../source/config.php"); $sql = "SELECT * FROM artikel_gegevens ORDER BY id"; $resultaat = mysql_query($sql) or die (mysql_error()); echo "<form action=\"admin-artikel-gegevens.php?actie=aanpassen\" method=\"post\">\n"; echo "<select name=\"code\" id=\"code\" class=\"snelstart\">\n"; echo "<option value=\"\">Maak een keuze ...</option>\n"; while ($dump_gegevens = mysql_fetch_object($resultaat)) { ==> if ($dump_gegevens->titel <> "*"){ echo "<option value=\"$dump_gegevens->id\">$dump_gegevens->uitvoering</option>\n"; } } echo "</select>"; echo " "; echo "<input type=\"submit\" name=\"submit\" value=\" Go! \" class=\"button\">\n"; echo "</form>\n"; mysql_close(); } I've gone through various resources but can't seem find draw this one out.. ??? Quote Link to comment https://forums.phpfreaks.com/topic/87385-solved-undefined-property-stdclass-titel/ Share on other sites More sharing options...
GingerRobot Posted January 23, 2008 Share Posted January 23, 2008 The error message would suggest that there is no field called 'titel' in your database. Perhaps a typo? Quote Link to comment https://forums.phpfreaks.com/topic/87385-solved-undefined-property-stdclass-titel/#findComment-447004 Share on other sites More sharing options...
patrickm Posted January 24, 2008 Author Share Posted January 24, 2008 Unbelievable... many times I've looked over de code and never saw it... I copied it from another piece of code I used and $titel isn't used here. Thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/87385-solved-undefined-property-stdclass-titel/#findComment-447607 Share on other sites More sharing options...
GingerRobot Posted January 24, 2008 Share Posted January 24, 2008 No worries. Always the little things that trip you up. Quote Link to comment https://forums.phpfreaks.com/topic/87385-solved-undefined-property-stdclass-titel/#findComment-447614 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.