db.php
Please I need help with the db.php file and access.
I was just Experimenting on the tutorial I just read. ANd I found out I do not have a db.php file. Can someone please explain how I could go about this?
Please I need help with the db.php file and access.
I was just Experimenting on the tutorial I just read. ANd I found out I do not have a db.php file. Can someone please explain how I could go about this?
rite2inno posted this at 11:24 — 29th April 2006.
They have: 8 posts
Joined: Apr 2006
Hiya,
I think I found the code----------
<?php
mysql_connect("localhost","username","password") or die ("Unable to connect to MySQL server.");
$db = mysql_select_db("name_of_database") or die ("Unable to select requested database.");
?>
But I am afraid I do not know how to replace the contants. Can some one do that for me?
The database username is "Clienty" and the password is "clienty"
But I do not know the host, or whta it looks like
-------------------------------------------------------
Notin much'Just me'
rite2inno posted this at 11:33 — 29th April 2006.
They have: 8 posts
Joined: Apr 2006
what could be my local host? I need an example. if my site is abc.com
Busy posted this at 21:39 — 29th April 2006.
He has: 6,151 posts
Joined: May 2001
<?php
mysql_connect("localhost","Clienty","clienty") or die ("Unable to connect to MySQL server.");
$db = mysql_select_db("<strong>name_of_database</strong>") or die ("Unable to select requested database.");
?>
I have added your username and password but you need the name of your database to go in the bold bit above.
Localhost is probably right, 90% of the time it is used as server name.
If on the off chance you are using this off line (on your own PC) then you may need to remove username and password, just leave empty quotes (""), for the web you need the username and password
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.