Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi Table Update - Edit Profile Page

Status
Not open for further replies.

redzonne

Programmer
Feb 20, 2005
27
US
It is important that you start adding error checking to all MySQL statements that could fail. If the error reporting level of the PHP installation is turned off or very low you will not get any notifications of the failed commands.
Here are some examples:
Code:
<?
# always trap connection errors
mysql_connect($host,$user,$pass) OR die("Cannot connect: ".mysql_error());
# trap database selection error
$link = mysql_select_db($db) OR die("Db selection error: ".mysql_error());
# Also trap failed queries
$result = mysql_query($SQL,$link) OR die("Query failed: ".mysql_error());
?>
Without that your errors might just disappear and all seems to work fine, but nothing happens.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top