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. Link to comment https://forums.phpfreaks.com/topic/9678-a-registration-page/ 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..) Link to comment https://forums.phpfreaks.com/topic/9678-a-registration-page/#findComment-35828 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 '; Link to comment https://forums.phpfreaks.com/topic/9678-a-registration-page/#findComment-35831 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. Link to comment https://forums.phpfreaks.com/topic/9678-a-registration-page/#findComment-35833 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.