Re: MYSQL Connection Problem - Please help | |
And, you do have a mistake in your code in the second part. Replace your code with this:
<?php
echo("Success 1");
$db_host= "localhost";
$db_username = "tuwipwa_?????????";
$db_password = "Krishna 1965";
$dbname ="tuwipwa_Study???????????";
$db = mysql_connect($db_host, $db_user, $db_password);
if ($db == FALSE){
$error = "Could not connect to the Database Server. Please check user details. Error = ". mysql_error();
exit($error);
}
echo "Completed DB connection";
mysql_select_db($db_name, $db);
if (!mysql_select_db($db_name, $db)) {
$error = "Could not select Database. Please check user details. Error = ". mysql_error();
exit($error);
}
echo "Completed DB selection";
// Your query here
mysql_close($db);
?>
The problem you were getting was the missing ";" in the $db_username = .......... line
__________________
Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |