Jump to content


Photo

Connect


  • Please log in to reply
2 replies to this topic

#1 Imtehbegginer

Imtehbegginer
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts

Posted 02 September 2006 - 08:41 PM

I cant find a post to connect, can someone post how to here?

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 September 2006 - 09:36 PM

Huh?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 09:39 PM

Guessing you mean how to connect to a selected MySQL database, this is adequate:

$db_login = ""; // your database login name
$db_pass = ""; // your database password
$db_name = ""; // your database name
mysql_connect($db_host, $db_login, $db_pass) or die ("Can't connect!"); 
mysql_select_db($db_name) or die ("Can't open database!");

Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users