note 98799 deleted from function.mysql-connect by danbrown

From: Date: Thu, 08 Jul 2010 14:11:19 +0000
Subject: note 98799 deleted from function.mysql-connect by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170788@lists.php.net to get a copy of this message
Note Submitter: octav at expect dot ro ---- This script works most of the time BUT if the password contains $ it doesn't work: $db_location = "localhost"; $db_username = "username"; $db_password = "pa$sword"; $db_name = "00000001050_a"; $link_id = mysql_connect ($db_location,$db_username,$db_password) or die ("Could not connect: " . mysql_error()); It took me a while to realize that I have to use ' instead of " for it to work $db_password = "pa$sword"; didn't work $db_password = 'pa$sword'; worked

« previous php.notes (#170788) next »