Most problems are caused by the developer doing something wrong. With this in mind, before posting here, you should:
- Set up error_reporting(E_ALL). Ensure that errors are always displayed (safe for development environments only) or logged (safe anywhere). Read the log files. DO NOT suppress errors with the @ operator for functions likely to fail (mysql_connect, mysql_query() etc.).
If, upon turning on error_reporting(E_ALL), you get 1 bazillion* notices / warnings on your error log, please fix those faults immediately, then try again.
Try to diagnose where the fault happens. If it stops part way through the expected execution of the script, try to find out where. Either use a PHP debugger, or echo, or error_log() to determine where the fault is (if you can't get the error with error_reporting)
If you MUST post here, record all relevant details:
Versions of PHP, web server, web browser, and if databases are involved, the database
All error messages appearing on the error log, or those produced by the browser.
What the expected behaviour of your code is. Maybe some of us are telepaths who can figure out what you're trying to do, but I'm not 🙂
If you're going to quote bits of code, use php tags. Don't paste more than about 20-30 lines however, because people will not want to trawl through your code.
Don't post anything security-critical! This includes passwords, production data, core dumps, error logs which might contain anything important (i.e. from production servers)
Cheers
Mark