mistakes! Posted May 15, 2006 Share Posted May 15, 2006 hello i am trying to write a registration code but when i feel in the form i get this message Your email entry already exists..so please register again.$queryq = "insert into registered values('$flag','$firstname','$lastname','$dateofbirth','$email','$password','$companyname','$street','$country','$phone','$fax','$area')";$resultq = mysql_query($queryq) or die("Your email entry already exists..so please register again..");$sub="Registration";pls any ideas will be highly appreciated. Quote Link to comment Share on other sites More sharing options...
.josh Posted May 15, 2006 Share Posted May 15, 2006 change this:$resultq = mysql_query($queryq) or die("Your email entry already exists..so please register again..");to this:$resultq = mysql_query($queryq) or die(mysql_error());and it will give you a hint to fix it. if you still can't fix it then ask again.hint: insert into table (column1, column2, etc...) values (value1,volumn2, etc..) Quote Link to comment Share on other sites More sharing options...
mistakes! Posted May 15, 2006 Author Share Posted May 15, 2006 hello thks alot for all your help i was able to solve the problem...one last question on registration the code is meant to send an auto email to the registrant and it is not doing that. where have i gone wrong?$queryq = "insert into registrant values('$flag','$firstname','$lastname','$dateofbirth','$email','$password','$companyname','$street','$country','$phone','$fax','$area')";$resultq = mysql_query($queryq) or die("Error with the query. Message: ".mysql_error());print mysql_error(); $sub="Registration";$message="You have been registered has an author with id $flag";mail($email,$sub,$message,'From : admin');echo ' You have been sign-up successfully '; Quote Link to comment Share on other sites More sharing options...
.josh Posted May 15, 2006 Share Posted May 15, 2006 probably $email does not hold the value you think it holds. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.