|
best KNOWLEDGE BASE
|
How do I connect to my MySQL database with PHP
To connect to your MySQL database use the following syntax in your PHP script:
MySQL_Connect("localhost", "your_user_name", "your_password");
Say for example your username was "beans" and your password was "cheese" you would use the following
syntax:
<? MySQL_Connect("localhost", "beans", "cheese"); ?>
Note: Make sure you ALWAYS use "localhost" and NOT the name of your server etc!
MySQL_Connect("localhost", "beans", "cheese"); ?>
Updated: 12/15/100
In a hurry? Try keyword searching...
|
|
|