Jump to content

Archived

This topic is now archived and is closed to further replies.

mistakes!

a registration page

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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..)

Share this post


Link to post
Share on other sites
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 ';

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.