Jump to content

help.php my site won't connect to the database


Recommended Posts

pls..i do need help..i can't connect my site to the database that i made. i have already change the details in my php script with the one provided by the web hosting site.pls..help me with this one..i'm getting the error:

 

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Program Files\xampp\htdocs\xampp\GPS_Php4\connection.php on line 24

 

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\Program Files\xampp\htdocs\xampp\GPS_Php4\connection.php on line 24

 


<?php

$mysql_host = "mysql3.000webhost.com";
$mysql_database = "a5200862_shop";
$mysql_user = "a5200862_tine";
$mysql_password = "youknowwho";


if($con=@mysql_connect($mysql_host,$mysql_user,$mysql_password))
{
echo "You are connected";
}
else {
echo "Not Connected";
}
$con=mysql_select_db($mysql_database);
?>

 

i've already check the table names and column also the database name and so on..pls,...help help..i really need to pass this project..:) thank you so much in advance!!!

Link to comment
Share on other sites

i used your codes but still i'm not able to connect to the database..It falls on the die statement which is "error in selecting db".. and i've check the database name over and over again..i really don't have any idea what's going on..there server is still up by the way..any comments..plss...i really need help ??? :(

Link to comment
Share on other sites

Post the current code and the error message.

 

The original code did not stop when there was an error with the msyql_connect(), so the mysql_select_db() attempted to make a connection using default values, which failed. You should have received the "Not Connected" message.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.