FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a 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

how do i put my site name on the frihost index page
Can I install Coppermine in DirectAdmin?
News and Comment system!
Selling .info (any name) {SOLD}
'Where To' For Domain Name Registration?

Help with PhpBB
Mambo Users
PHP script trouble
Wordpress - where's my meta info?
PhpNuke Installation Tutorial

Need Help Yet again :: Comment system, data from 3 tables !!
phpBB - Installation Tutorial
FTP Guide
Problems with Member System (RMB-SCRIPTING)
1988: Obama helped stranded traveler in Miami
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

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