Maxpower5757

Maxpower5757

Joined
Oct 31, 2004

Activity Stream

Maxpower5757 commented on a Page, Connect to MySQL  -  Jun 05, 2005

you missed some stuff

<?

//set the variables as required
$dbhost = \"mysite.com\";
$dbuser = \"username\";
$dbpass = \"password\";
$dbname = \"database_name\";

//do not edit this, it connects the script
mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname) or die(mysql_error());

?>

<\'s are nice in front of a php tag :P
also the or die is for security reasons and is helpfull

 Respond  
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.