One quick note about require vs include, require will stop your script from running at all should the file be missing (ie: you may not even get your errors displayed, tho those sorts of bugs seem to be related to specific versions). Both require() and include() have siblings that check to ensure a file is not already included (require_once and include_once). In your code HT, I don't really see that as being a relevant problem. I take it that it's fixed now tho from your last statement?Originally posted here by Noia
A few points btw;
1) Replace your include statements with require_once, most of the ones you use will be required, so you don't want the program to continue without them and you don't want the same file included more than once. Atleast this holds true under normal circumstances
PEAR:3) Your query should preferably have a 'or die("something");' statement to go with it although its not strictly needed in this case.
I personaly, would write a error-handeling class for this sort of application, it takes a lill while to code but saves you alot of time when you can simple go mysql_query($bleh) or $error->message_die_log(mysql_error(),'Some error','the query failed and stuff','index.php); which would forexample log mysel_error(), display a simple error message and redirect to index.php after a given amount of time.B already covers all the error handling and such.
![]()




B already covers all the error handling and such.
Reply With Quote