sign up problem
Posted: Tue Jul 31, 2007 7:59 pm
Hi
this error:
Column count doesn't match value count at row 1
why happens?
the code is:
thanks in advance
this error:
Column count doesn't match value count at row 1
why happens?
the code is:
Code: Select all
$result=mysql_query("SELECT * FROM `publisher` WHERE `email`='$email'" )or die(mysql_error());
$count_row = mysql_num_rows($result);
if($count_row > 0)
{
error("The email address you have provided already exists");
}
$result=mysql_query("SELECT * FROM `publisher` WHERE `username`='$username'" )or die(mysql_error());
$count_row = mysql_num_rows($result);
if($count_row > 0)
{
error("The username already exists. Please choose another one.");
}
else{
$signup=mysql_query("INSERT INTO `publisher` (fname ,lname ,email ,country ,company ,companyplace ,industry ,addr1 ,addr2
,city ,state ,zip ,phone , fax ,site ,sitelang ,sitetype ,traffic, trafficsource, tax, taxid, payee ,username, hear, newsletter, pass) VALUES
( '$fname' , '$lname' , '$email' , '$country' ,'$company' ,'$companyplace' ,'$industry' ,'$addr1', '$addr2'
'$city' ,'$state' ,'$zip' ,'$phone' ,'$fax' ,'$site' ,'$sitelang' ,'$sitetype' ,'$traffic' ,'$trafficsource','$tax','$taxid'
,'$payee' ,'$username','$hear','$newsletter','$pass' )") or die(mysql_error());
if($signup) echo "Thank you\n\nYou have registered successfully.";
$subject="Your Password";
$message=" Thank you for registering with us. Your login details is : \n\n username: $username \n\n password: $pass";
$sender="";
mail($email, $subject, $message ,$sender);
echo "Your password has been sent to your email.";
}