Just wondering if this is good practice or not? It seems to work but I couldn't find anything on this:
I want to do it this way so I can have all errors echo'ed in an errors section on the page.Code:if(!@mysql_connect('localhost', 'user', 'password')) { //Connect to Server exit($error[] = '<p>Unable to connect to the database server</p>'); } else { if(!@mysql_select_db('dbname')) { //Select Database exit($error[] = '<p>Unable to select database.</p>'); } }







Bookmarks