Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » PHP




 Page 1 of 1 [ 5 posts ] 



Author Message
 Post subject: Query Error
 Post Posted: Thu Nov 12, 2009 11:01 am 
Offline

Joined: Sat Feb 21, 2009 2:25 pm
Posts: 51
Code:
$sql="INSERT INTO Users (userid, Username, Password, EMail, Account Type)
VALUES
(" . $count . "," . $username . "," . $password . "," . $_POST['email'] . "," . $at . ")";
$result = mysql_query($sql , $connection);


The problem I am having with the script is that it is not inserting the data. I am 99.99% sure that is the fault of the way I wrote up the $sql= line. Does anyone see what I did wrong?

EDIT: I forgot to mention. It IS connecting to the database just fine so that is NOT the problem.


Top 
 Post subject: Re: Query Error
 Post Posted: Thu Nov 12, 2009 11:02 am 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
AA-
Code:
$sql="INSERT INTO `Users` (userid, Username, Password, EMail, Account Type)
VALUES
( '$userid', '$username', '$password', '$email', '$account_type' );


Top 
 Post subject: Re: Query Error
 Post Posted: Thu Nov 12, 2009 11:02 am 
Offline

Joined: Sat Feb 21, 2009 2:25 pm
Posts: 51
Thanks man, still doesn't work though :-|


Top 
 Post subject: Re: Query Error
 Post Posted: Thu Nov 12, 2009 11:03 am 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
add an
Code:
or trigger_error(mysql_error(),E_USER_WARNING);


to the mysql_query and post the error


Top 
 Post subject: Re: Query Error
 Post Posted: Thu Nov 12, 2009 11:03 am 
Offline

Joined: Sat Feb 21, 2009 2:25 pm
Posts: 51
thanks maya


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 5 posts ] 




Board index » Server Side Development » PHP


Who is online

Users browsing this forum: No registered users and 2 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron