when i click on submit it doesn't go to the thank you page. i have the register.php which is the form and the formMail1.php file
maybe you should point the form to the next page: <form name="formMail1" method="post" action="formMail1.php">
tried that and it don't work gettin this error Parse error: syntax error, unexpected '}' in /home/gi2on3/public_html/formMail1.php on line 4
<?php $emptyStr = true; $uNameErr = true; } if(empty($_POST["agency"])){ $emptyStr = true; $agencyErr = true; } if(empty($_POST["position"])){ $emptyStr = true; $positionErr = true; } if(empty($_POST["address"])){ $emptyStr = true; $addressErr = true; } if(empty($_POST["city"])){ $emptyStr = true; $cityErr = true; } if(empty($_POST["state"])){ $emptyStr = true; $stateErr = true; } if(empty($_POST["country"])){ $emptyStr = true; $countryErr = true; } if(empty($_POST["phone"])){ $emptyStr = true; $phoneErr = true; } else { $myPhone = $_POST["student"]; } if(empty($_POST["amount"])){ $emptyStr = true; $amountErr = true; } else { $myAmount = $_POST["amount"]; } if(empty($_POST["student"])){ $emptyStr = true; $studentErr = true; } else { $myStudent = $_POST["student"]; } if(empty($_POST["comment"])){ $emptyStr = true; $commentErr = true; } else{ if (strlen($_POST["comment"]) > 800) $myComment = substr($_POST["comment"],0,800); else $myComment = $_POST["comment"]; } if(!$emptyStr) { $admin_email = 'benjijaded123@yahoo.com'; $headers1 = "From: " ; $sub1 = 'New comment (GI2Online)'; $message1 = 'Name : ' .$_POST["uName"] ."\r\n"; $message1 .= 'Agency: '.$_POST["agency"] ."\r\n"; $message1 .= 'Position: '.$_POST["position"] ."\r\n"; $message1 .= 'Address: '.$_POST["address"] ."\r\n"; $message1 .= 'City: '.$_POST["city"] ."\r\n"; $message1 .= 'State: '.$_POST["state"] ."\r\n"; $message1 .= 'Country: '.$_POST["country"] ."\r\n"; $message1 .= 'Phone: '.$_POST["phone"] ."\r\n"; $message1 .= 'Amount: '.$myAmount ."\r\n"; $message1 .= 'Student: '.$myStudent ."\r\n"; $message1 .= 'Comment: '.$myComment ."\r\n"; mail ($admin_email, $sub1, $message1, $headers1); header("Location: http://www.gi2online.com/thank_you.html"); exit; } } ?>
i took it out and it still doesn't work i get... Parse error: syntax error, unexpected '}' in /home/gi2on3/public_html/formMail1.php on line 85