I keep getting my "if(!$query)". I cleared all the parse php errors . this bit of code is killing i cant get the to the else congratulations. I paid for the overall coding initially and I'm doing "simple" updates/ changes myself...
can anyone see why its not writing to tables? (fyi - the online live original version works fine, i've only added new strings and database fields)
does order have anything to do with this ?
//if update button clicked on this form
if(isset($_POST['update']))
{
//get all the data from the POST
$prod_fname=$_POST['prod_fname'];
$prod_lname=$_POST['prod_lname'];
$prod_comp=$_POST['prod_comp'];
$prod_address=$_POST['prod_address'];
$prod_city=$_POST['prod_city'];
$prod_state=$_POST['prod_state'];
$prod_zip=$_POST['prod_zip'];
$prod_user=$_POST['prod_user'];
$prod_pass=$_POST['prod_pass'];
$prod_email=$_POST['prod_email'];
$prod_phone=$_POST['prod_phone'];
$prod_phone2=$_POST['prod_phone2'];
$prod_fax=$_POST['prod_fax'];
$prod_website=$_POST['prod_website'];
$fprod_name=$_POST['fprod_name'];
$fprod_city=$_POST['fprod_city'];
$fprod_state=$_POST['fprod_state'];
$query=mysql_query("INSERT INTO producer SET
prod_user='$prod_user',
prod_pass='$prod_pass',
prod_fname='$prod_fname',
prod_lname='$prod_lname',
prod_comp='$prod_comp',
prod_address='$prod_address',
prod_city='$prod_city',
prod_zip='$prod_zip',
prod_state='$prod_state',
prod_email='$prod_email',
prod_phone='$prod_phone',
prod_phone2='$prod_phone2',
prod_fax='$prod_fax',
prod_website='$prod_website',
fprod_name='$fprod_name',
fprod_city='$fprod_city',
fprod_state='$fprod_state',
");
if(!$query)
echo "<br> problem creating profile, please hit the BACK button and try again !! <br>";
else
{
//SET cookies to keep the user logged in
//echo "<br><br> before cookies user name is: $user, pass is $pass<br><br>";
//write new data to the cookies
setcookie("prod_user",$prod_user);
setcookie("prod_pass",$pass_user);
//echo("cookies created for prod<br>");
//echo "<br><br> After cookies in cookies user is".$_COOKIE['user']." and pass is ".$_COOKIE['pass']." <br><br>";
echo "<br> Congratulations, Your profile has been created successfully<br><br><a href=\"prod_done.php\"> Click here </a> to view or edit your profile";
}
}