Form Tools
[FIXED] Form not submitting, no thankyou page - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: [FIXED] Form not submitting, no thankyou page (/showthread.php?tid=242)



[FIXED] Form not submitting, no thankyou page - sergiozambrano - Aug 14th, 2009

Note that you need the word "submit" inside the line
if (isset($_POST['submit'])) {
to match your submit button "name" attribute.

e.g. if your submit button is not named "submit" but "contact_submit" your code should look something like:

if (isset($_POST['contact_submit'])) {
$rules = array();
$rules[] = "required,name,Please enter your name.";
$rules[] = "required,email,Please enter your email address.";
$rules[] = "valid_email,email,Please enter a valid email address.";
$errors = validate_fields($_POST, $rules);

I hope that helps you save hours!