Database connection

From: Date: Thu, 17 Jul 2003 19:29:12 +0000
Subject: Database connection
Groups: php.db 
Request: Send a blank email to php-db+get-29287@lists.php.net to get a copy of this message
I'm trying to use PHP 4.2.3 in a database application. <?php print "Connected?"; $dbcnx = mysql_connect("localhost","root","asda"); if (!$dbcnx) { echo("<p>Unable to connect to database server.</p>"); exit(); }else { print "Connected!"; } ?> Gives Connected? Fatal error: Call to undefined function: mysql_connect() in /var/www/html/irm/test.php on line 3 While changing the line to $dbcnx = @mysql_connect("localhost","root","asda"); is in the MySQL example simply prints Connected? and nothing more happens. My app isn't using the database (later on). Never had this problem on 4.0.x which makes me a bit confused. What am i doing wrong? /M.

« previous php.db (#29287) next »