Posted by:
RealNubSlayer
(---.hsd1.ma.comcast.net)
Here you go, if you where asking for script
$mysql_database_server_name = "localhost"; //Most of the time this is 'localhost'\\
$mysql_database_name = "db"; //This is the name of the database \\
$mysql_databse_user = "root"; //Please put a user that has access to the previously mentioned database, when using wamp, the deafault user is 'root', with no password\\
$mysql_database_user_pass = ""; //Put the password to the forementioned user here\\
$link = mysql_connect($mysql_database_server_name, $mysql_databse_user, $mysql_database_user_pass);
if (!$link) {
die('Not connected : ' . mysql_error());
}
$db = $mysql_database_name;
$db_selected = mysql_select_db($db, $link);
if (!$db_selected) {
die ('Can\'t use database :' . $db . ' <br>Reason: ' . mysql_error());
}
this needs to be at the begining of ever file connecting, i reccomend using some include()s.. make the script above into, connect.php then at the top of every file do
<?php
include("connect.php"
;
..
..
script
..
..
?>
or wherever you need to..