Help - Search - Members - Calendar
Full Version: Any1 good in PHP?
MSFN Forums > Coding, Scripting and Servers > Web Development (HTML, Java, PHP, ASP, XML, etc.)

   
Google Internet Forums Unattended CD/DVD Guide
cancer10
I am unable 2 run this login script

please help me making it work


http://www.shouvik.mfhosting.com/test/test2/
gamehead200
Ummmmm... Did you setup a MySQL database? confused.gif
matrix0978
QUOTE
Warning: mysql_connect(): Access denied for user: 'shouvik_pompa@orbit.serverz.org' (Using password: YES) in /home/shouvik/public_html/test/test2/login.php on line 14
Access denied for user: 'shouvik_pompa@orbit.serverz.org' (Using password: YES)


Seems like you put in the wrong username. There shouldnt be a, @orbit.serverz.org. What ever your username to log into your web hosting account is what you put there. If im mistaken im sorry.
matrix0978
Also, did you check to see if you make a Table in your MySQL database?
cancer10
well, can u guys make my script work? I am giving u the full source code in zip format. U c that i am a n00b in php, I got that code fomr some site but its not working for me or may b i cannot get it into work


http://www.shouvik.mfhosting.com/test/test...load_Source.zip
matrix0978
CODE
<?php
//config.php
//http://www.codingdreams.org

$db_host = "shouvik.mfhosting.com";    //Where your mysql server is
$db_user = "shouvik_pompa";    //The user name of your mysql account
$db_pass = "shouvik_pompa";  //The password of your mysql account
$db_name = "shouvik_dblogin";    //The database you would like to work with
$db_table = "tbllogin";    //The table that was created from install.php
$usernameI = "admin";    //Our user name for the install
$passwordI = "codingdreams"; //Our password for the install

?>


Ok well for '$db_host = "shouvik.mfhosting.com;"'

You want to put 'localhost' for it to look like.

CODE
$db_host = "localhost";


Have you created the table in the MySQL Database?
cancer10
QUOTE (matrix0978 @ Apr 22 2005, 12:01 PM)
CODE
<?php
//config.php
//http://www.codingdreams.org

$db_host = "shouvik.mfhosting.com";    //Where your mysql server is
$db_user = "shouvik_pompa";    //The user name of your mysql account
$db_pass = "shouvik_pompa";  //The password of your mysql account
$db_name = "shouvik_dblogin";    //The database you would like to work with
$db_table = "tbllogin";    //The table that was created from install.php
$usernameI = "admin";    //Our user name for the install
$passwordI = "codingdreams"; //Our password for the install

?>


Ok well for '$db_host = "shouvik.mfhosting.com;"'

You want to put 'localhost' for it to look like.

CODE
$db_host = "localhost";


Have you created the table in the MySQL Database?
*




yes but still of no use also tried using localhost but same result sad.gif


can u make me a mysql database so that I will only need to upload it and make it work smile.gif
ZeroHour
Try taking out the @ section.
Confirm what you need with your isp/host
matrix0978
We cant make on for you, but the install.php looks like it should work. From what i see, if you opened up your install.php and ran it, and it checked as ok. then it should work after making the table. There must be something wrong in the config file. But keep host as 'localhost'.

CODE
$db_table = "tbllogin"; //The table that was created from install.php


change that to

CODE
$db_table = "users"; //The table that was created from install.php


and try using this script to make table.

CODE
<?php
    $linkID = mysql_connect('localhost','login','password')
    or die("Error,database not accessing!");
    mysql_select_db('masterdb',$linkID);

CREATE TABLE 'users' (

'id' BIGINT(11) DEFAULT '0' NOT NULL AUTO_INCREMENT ,

'username' VARCHAR( 25 ) NOT NULL ,

'password' VARCHAR( 25 ) NOT NULL ,

PRIMARY KEY ('id')

);

?>
cancer10
and try using this script to make table.

CODE
<?php
    $linkID = mysql_connect('localhost','login','password')
    or die("Error,database not accessing!");
    mysql_select_db('masterdb',$linkID);

CREATE TABLE 'users' (

'id' BIGINT(11) DEFAULT '0' NOT NULL AUTO_INCREMENT ,

'username' VARCHAR( 25 ) NOT NULL ,

'password' VARCHAR( 25 ) NOT NULL ,

PRIMARY KEY ('id')

);

?>

*

[/quote]



Where shall I put this code?

I am sorry I m bothering u alot, actually I am a n00b in php and mysql and I need a login script to put in my site.

I am sorry again.
sad.gif
matrix0978
Make a file called 'install2.php' and upload it to server and open it in brower.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.