| | |
To create a registration page and login page
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
if i want to register on my website this comes :
PHP Error Message
PHP Error Message
HTML and CSS Syntax (Toggle Plain Text)
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'UserName'@'localhost' (using password: YES) in /home/a4497797/public_html/dbConfig.php on line 12 Free Web Hosting Error connecting to database. PHP Error Message Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a4497797/public_html/dbConfig.php on line 20 Free Web Hosting PHP Error Message Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/a4497797/public_html/dbConfig.php on line 20 Free Web Hosting PHP Error Message Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a4497797/public_html/register.php on line 39 Free Web Hosting PHP Error Message Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/a4497797/public_html/register.php on line 39 Free Web Hosting PHP Error Message Warning: mysql_insert_id() [function.mysql-insert-id]: A link to the server could not be established in /home/a4497797/public_html/register.php on line 42 Free Web Hosting Error: User not added to database.
Last edited by peter_budo; Jan 6th, 2009 at 9:38 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Oh... there's something wrong with the details (or constants) you specified in your dbConfig.php file. This is the code provided in the 1st page of this thread (with comments):
The details in red are provided by your host. Most likely, you won't be changing
You can't just guess values for that. Ask your host for those details. The script will work fine once you get those values.
Or if you use cpanel, I might be able to guide you into setting up a database.
<?
// Replace the variable values below
// with your specific database information.
$host = "localhost";
$user = "UserName";
$pass = "Password";
$db = "dbName";
// This part sets up the connection to the
// database (so you don't need to reopen the connection
// again on the same page).
$ms = mysql_pconnect($host, $user, $pass);
if ( !$ms )
{
echo "Error connecting to database.\n";
}
// Then you need to make sure the database you want
// is selected.
mysql_select_db($db);
?>The details in red are provided by your host. Most likely, you won't be changing
$host = "localhost"; but you need the $user, $pass, and $db . Unfortunately, I can't get that for you since only you are supposed to know your password. The username ($user) and database name ($db) can be requested from your host.You can't just guess values for that. Ask your host for those details. The script will work fine once you get those values.
Or if you use cpanel, I might be able to guide you into setting up a database.
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
•
•
•
•
Soo i need to change:
$host = "localhost"; $user = "UserName"; << My UserName? $pass = "Password"; << My Password? $db = "dbName"; << My Database?
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Dude i did ,, but now i get this :
PHP Error Message
PHP Error Message
HTML and CSS Syntax (Toggle Plain Text)
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'a4497797'@'localhost' (using password: YES) in /home/a4497797/public_html/dbConfig.php on line 10 Free Web Hosting Error connecting to database. PHP Error Message Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a4497797/public_html/dbConfig.php on line 18 Free Web Hosting PHP Error Message Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/a4497797/public_html/dbConfig.php on line 18 Free Web Hosting Username: Password: Email Address:
Last edited by peter_budo; Jan 6th, 2009 at 9:39 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Wait... why are you connecting twice? (In line 10 and in line 18 of your dbConfig.php file)... Did you comment out the sample code properly?
And as I said, as long as the details/values are correct, you should be able to connect!
By the way, mysqladmin is most likely NOT your database name. It's something you can use to create databases and tables...
Can you post your dbConfig.php file? Be sure to comment out the values like this:
Because I think you've accidentally made two sets of connection variables in your config file (thus the double-connection error).
And as I said, as long as the details/values are correct, you should be able to connect!
By the way, mysqladmin is most likely NOT your database name. It's something you can use to create databases and tables...
Can you post your dbConfig.php file? Be sure to comment out the values like this:
<?
// Replace the variable values below
// with your specific database information.
$host = "XXXXXXXX";
$user = "XXXXXXX";
$pass = "XXXXXXXX";
$db = "XXXXXX";
// This part sets up the connection to the
// database (so you don't need to reopen the connection
// again on the same page).
$ms = mysql_pconnect($host, $user, $pass);
if ( !$ms )
{
echo "Error connecting to database.\n";
}
// Then you need to make sure the database you want
// is selected.
mysql_select_db($db);
?>Because I think you've accidentally made two sets of connection variables in your config file (thus the double-connection error).
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
K i post my dbConfig.php here it is :
Btw the "XXX'S" are NOT MY REAL DETAILS
php Syntax (Toggle Plain Text)
<? [COLOR="Red"]$host = "XXXXX"; $user = "XXXXXX"; $pass = "XXXXX!"; $db = "XXXXXX";[/COLOR] // This part sets up the connection to the // database (so you don't need to reopen the connection // again on the same page). $ms = mysql_pconnect($host, $user, $pass); if ( !$ms ) { echo "Error connecting to database.\n"; } // Then you need to make sure the database you want // is selected. mysql_select_db($db); ?>
Btw the "XXX'S" are NOT MY REAL DETAILS
Last edited by peter_budo; Jan 6th, 2009 at 9:40 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- Simple ASP.Net Login Page using C# (C#)
- Updated : Simple ASP.Net Login Page (ASP.NET)
- How to create a login page using ASp.net 2.0 c# (ASP.NET)
- Create a Login page (asp,c#,sql2k5) (C#)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- Error message when running ASP login page (ASP)
Other Threads in the HTML and CSS Forum
- Previous Thread: Two font sizes in one DIV?
- Next Thread: CSS not the same in IE as it is in FireFox
Views: 43536 | Replies: 63
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
2002 appointments asp background backgroundcolor beta browser bug calendar cart center cgi code codeinjection corporateidentity create css deleted design development displayimageinsteadofflash dreamweaver drupal emailmarketing epilepsy explorer firefox flash font fonts form format free frontpage google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft missing mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. templates textcolor theme timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 wordpress xml xsl





