FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Where do i put my info databse name username and login???





jspets
hi im new to php but i have been following a web tutorial that lets me have a login system. In step three of the tutorial it says: Open dbc.php to edit mysql database name, user name and password.
i have opened the file and it comes up with: (i have all the files that i need for the tutorial saved on my computer, so ijust need to add the info in)
<?php
$dbname = 'phplogin';
$link = mysql_connect("localhost","root","") or die("Couldn't make connection.");
$db = mysql_select_db($dbname, $link) or die("Couldn't select database");
?>

Where do i put database username and passowrd?
Bondings
jspets wrote:
hi im new to php but i have been following a web tutorial that lets me have a login system. In step three of the tutorial it says: Open dbc.php to edit mysql database name, user name and password.
i have opened the file and it comes up with: (i have all the files that i need for the tutorial saved on my computer, so ijust need to add the info in)
<?php
$dbname = 'phplogin';
$link = mysql_connect("localhost","root","") or die("Couldn't make connection.");
$db = mysql_select_db($dbname, $link) or die("Couldn't select database");
?>

Where do i put database username and passowrd?

First of all you need to create a database with a user and password in DirectAdmin. (maybe you already did that)

Then you change the phplogin in
Quote:
$dbname = 'phplogin';
to the name of the database, which will look like jspets_something.

Then secondly, in
Quote:
$link = mysql_connect("localhost","root","")
you need to change root into the database username and put the corresponding password inside the empty quotes. ("localhost","username","password")
jspets
cheers i have already made a database and now i have added that information.

where should i put the dbc.php?

follow this link and it shows you what he tutorial because i don't know what to do next
http://www.php-login-script.com/
Bondings
jspets wrote:
cheers i have already made a database and now i have added that information.

where should i put the dbc.php?

follow this link and it shows you what he tutorial because i don't know what to do next
http://www.php-login-script.com/

In the same directory then where it is situated in the zip , relative to where you want to have the script. Like in your public_html directory.
Related topics
News and Comment system!
how do i put my site name on the frihost index page
Help with PhpBB
Can I install Coppermine in DirectAdmin?
PhpNuke Installation Tutorial
Need Help : Dreamweaver sessions
phpBB - Installation Tutorial
Just uploaded. Shouldn't be jibberish.
FTP Guide
create swishmax Login with phpbb db
Login System Tutorial Part 1 Creating Registration
how do i create a Member access page
Selling .info (any name) {SOLD}
Login system doesn't work
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.