PHP & MySQL Problem

Status
Not open for further replies.

tearsfall

New Member
Messages
7
Reaction score
0
Points
0
I'm using PHP to insert data into MySQL and I'm running into bit of a problem. My script executes just fine, but when it comes to my query ... the query doesn't insert information into my database:

Here's my site: http://tearsfall.pcriot.com

here's my database table (within my forums database):

users(userID,firstName,middleIn,lastName,userAddress,userState,userCountry,userbirthDate,username,password,validcode,email,usergroup)

my userID column is set on auto_increment and it's the primary key.

and here's my PHP script:

mysql_query("INSERT INTO users VALUES('NULL,$firstName','$middleIn','$lastName','$userAddress','$userState','$userCountry','$username','$password','$validate_key','$email',1");
 

bugfinder

Retired
Messages
2,260
Reaction score
0
Points
0
mysql_query would return an error and looking at it..

You have values('NULL,$firstName' .. there ' in front of NULL needs to go to in front of $

Im also hoping theres more in your php script than that, but other issues for example should be returned by mysql_error
 
Status
Not open for further replies.
Top