shane18 Posted December 16, 2009 Share Posted December 16, 2009 I never did any type of ERROR HANDLING... but I decided to start doing it so that my site is more advanced... what things must I handle errors for? mysql stuff,file editing code, etc... anyone know what all i must make sure im error handling for... Quote Link to comment https://forums.phpfreaks.com/topic/185305-error-handling/ Share on other sites More sharing options...
mikesta707 Posted December 16, 2009 Share Posted December 16, 2009 Error handling can be done in tons of places. Any where your script can go wrong is a place for error handling. you especially want to handle errors from user input elegantly, so I would start there Quote Link to comment https://forums.phpfreaks.com/topic/185305-error-handling/#findComment-978222 Share on other sites More sharing options...
oni-kun Posted December 16, 2009 Share Posted December 16, 2009 trigger_error is a useful function rather than using 'die' for mySQL queries, as it can log errors for later. As for your file handling, file_exists, etc. Not specific enough to really answer more. Using REGEX and filtering data via escaping is a must while transferring data between interfaces, so there's another start. Quote Link to comment https://forums.phpfreaks.com/topic/185305-error-handling/#findComment-978223 Share on other sites More sharing options...
shane18 Posted December 16, 2009 Author Share Posted December 16, 2009 Isn't set_error_handler(); and making our own function the best way to handle all ur errors? I want to be able to display the error a certain way for certain errors, and place the error message on the page where I want.... Quote Link to comment https://forums.phpfreaks.com/topic/185305-error-handling/#findComment-978235 Share on other sites More sharing options...
shane18 Posted December 16, 2009 Author Share Posted December 16, 2009 Also, how can you easily make it where if a mysql_query fails u can check to see if there was an error so u can post "ERROR OCCURED - PLEASE TRY AGAIN".... Quote Link to comment https://forums.phpfreaks.com/topic/185305-error-handling/#findComment-978237 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.