note 48736 added to function.mysql-connect

From: Date: Wed, 05 Jan 2005 20:53:51 +0000
Subject: note 48736 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-82796@lists.php.net to get a copy of this message
Hello, i was wondering if you could tell something about the code below. Is this a correct database connection? I mean, would professionals use it? <?php $server = "localhost"; $database = "db"; $user = ""; $pass = ""; $connect = mysql_connect($server) or die(mysql_error()); $db = mysql_select_db($database, $connect) or die(mysql_error()); ?> Greetings carefree ---- Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48736 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48736&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48736&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48736&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48736&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48736&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48736&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48736&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82796) next »