8, September 2008

can't get register.php to conent to my database - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: can't get register.php to conent to my database
« previous next »
Pages: [1] Print

Author Topic: can't get register.php to conent to my database  (Read 374 times)
I love Pokemon
*
Posts: 14
108 credits
Members referred : 0


« on: Jul 10, 2008, 08:47:41 PM »

Orignal Code:
Code:
<?php 

//This function will display the registration form 
function register_form(){ 

$date date('D, M, Y'); 
echo 
"<form action='?act=register' method='post'>" 
    
."Username: <input type='text' name='username' size='30'><br>" 
    
."Password: <input type='password' name='password' size='30'><br>" 
    
."Confirm your password: <input type='password' name='password_conf' size='30'><br>" 
    
."Email: <input type='text' name='email' size='30'><br>" 
    
."<input type='hidden' name='date' value='$date'>" 
    
."<input type='submit' value='Register'>" 
    
."</form>"



//This function will register users data 
function register(){ 

//Connecting to database 
$connect mysql_connect("host""username""password"); 
if(!
$connect){ 
die(
mysql_error()); 


//Selecting database 
$select_db mysql_select_db("database"$connect); 
if(!
$select_db){ 
die(
mysql_error()); 


What I changed that is giving error:

Code:
//Selecting database
$select_db = mysql_select_db("members", $connect);
if(!$select_db){
die(mysql_error());
}


Error:
Access denied for user 'dbo6598552'@'%' to database 'members'

What am I doing wrong? I am using php5.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8037
41179 credits
Members referred : 3



« Reply #1 on: Jul 14, 2008, 09:37:17 AM »

This error indicates that you are giving a wrong username/password to mysql

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7844
Tags : php mysql Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: can't get register.php to conent to my database
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Sep 08, 2008, 08:46:54 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 36.302
Total Topics: 7.479
Total Members: 3.908
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: top10php

28 Guests, 5 Users online :

5 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.