Connecting to a MySQL database

From: Date: Sun, 13 Apr 2003 21:07:00 +0000
Subject: Connecting to a MySQL database
References: 1 2  Groups: php.install 
Request: Send a blank email to php-install+get-10615@lists.php.net to get a copy of this message
<?php $conn = mysql_connect("localhost", "john",""); mysql_select_db("contactDB", $conn); ?> Does not work and gives the typical "This document contains no data ... as it always does when the script has a problem. Do I not have something setup right in the php.ini file? The following DOES work. <?php $conn = mysql_connect("localhost", "john",""); echo "$conn"; ?>

« previous php.install (#10615) next »