RE: [PHP] Need help

From: Date: Tue, 26 Mar 2002 13:20:55 +0000
Subject: RE: [PHP] Need help
Groups: php.general 
Request: Send a blank email to php-general+get-90179@lists.php.net to get a copy of this message
place these statements in your include file, which is standard for PHP development: $link=mysql_connect("localhost","user","12345") or die("Error: cannot connect".mysql(error()); mysql_select_db("mydatabase") or die("Error: cannot select db: ".mysql_error()); -----Original Message----- From: Denis L. Menezes [mailto:menezesd@singnet.com.sg] Sent: Tuesday, March 26, 2002 7:14 AM To: php-general@lists.php.net Subject: [PHP] Need help Hello friends. I am a newbie to php. I am trying to connect to mysql with php. I have a website called www.abcresources.com The mysql database set up by the hosting company is called "abc_resources.com" I have a table called "addressbook" I log in into the admin page with my username as "user" and password as "12345". After that I do not use any username and password. So I am not sure if I need a username and password in the connection string. I have this line to connect : if (!($link=mysql_connect($hostname,$username,$password))){ displayerr(sprintf("internal error %d:%s\n", mysql_errno(), mysql_error())); What should $hostname, $username and $password be in the globals.php file? Thanks for help. Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#90179) next »