Concordia

Concordia

Joined
Jun 22, 2005
Occupation
Student
Location
NJ, USA
Interests
PHP, XHTML, and CSS, of course!

Activity Stream

Concordia commented on a Page, Connect to MySQL  -  Jun 27, 2005

Sometimes it\'s a good idea to define the constants, it makes it more secure.

<?

//set the variables as required
define (DBHOST, \'mysite.com\');
define (DBUSER, \'username\');
define (DBPASS, \'password\');
define (DBNAME, \'database_name\');

//do not edit this, it connects the script
mysql_connect (DBHOST, DBUSER, DBPASS);
mysql_select_db (DBNAME) OR die (mysql_error ());

?>

 Respond  
Concordia commented on a Page, Error handler...  -  Jun 24, 2005

Most certainly. To use it how it is, just take the third line:

$err_h = array (\'status\' => \'DEVELOPMENT\', \'email\' => \'CaptSushekECF@aol.com\', \'log\' => \'error_log.html\'); // Set status to either \"DEVELOPMENT\" or \"LIVE\", any other variables will not work properly; set email to the email address errors will be logged to during LIVE mode; set log to the location errors will be logged.

$err_h is an array that sets up how it works.

 Respond  
Concordia created a Page  -  Jun 22, 2005
224 

Hey, this is my error handler (well, the standard one). It's multi-purpose, easy to understand, and to change from occurance to occurance only requires changes in three or so variables.

  2 Threads   PHP  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.