galvin Posted January 7, 2009 Share Posted January 7, 2009 I keep getting this message (Notice: Undefined index: ispremadefile1 in C:\wamp\www\pas\fillscript1.php on line 655) from the following code. Without making anyone weed through all of my code, is there an easy answer as to how to avoid this Notice? It's just a Notice and not an error, but I'd like to get rid of it if possible, but can't figure out how... if (($isfile1 == "yes") || ($_SESSION['ispremadefile1'] == "yes")) { Link to comment https://forums.phpfreaks.com/topic/139774-solved-notice-undefined-index/ Share on other sites More sharing options...
Chicken Little Posted January 7, 2009 Share Posted January 7, 2009 in the php.ini file set the following display_errors = Off Link to comment https://forums.phpfreaks.com/topic/139774-solved-notice-undefined-index/#findComment-731277 Share on other sites More sharing options...
cytech Posted January 7, 2009 Share Posted January 7, 2009 If you do not have access to your ini file you can also just put: ini_set('display_errors', 'Off'); In your core include or header file. Link to comment https://forums.phpfreaks.com/topic/139774-solved-notice-undefined-index/#findComment-731283 Share on other sites More sharing options...
kenrbnsn Posted January 7, 2009 Share Posted January 7, 2009 Change the line to <?php if (($isfile1 == "yes") || (isset($_SESSION['ispremadefile1']) && $_SESSION['ispremadefile1'] == "yes")) { ?> Ken Link to comment https://forums.phpfreaks.com/topic/139774-solved-notice-undefined-index/#findComment-731310 Share on other sites More sharing options...
galvin Posted January 9, 2009 Author Share Posted January 9, 2009 Right again, Ken, thanks!!! Link to comment https://forums.phpfreaks.com/topic/139774-solved-notice-undefined-index/#findComment-733027 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.