From 4b384795e53cbbe789739bdc91e704803809c110 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Thu, 19 Jun 2014 16:24:52 -0400 Subject: [PATCH] fix robot field when haven't submitted yet --- contact.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contact.php b/contact.php index 769b2c5..86fccb9 100644 --- a/contact.php +++ b/contact.php @@ -29,14 +29,14 @@ function contact_main() { } function contact_main_form($id = false) { + $robot_correct = "" . $GLOBALS['contact_robot_answer']; + $robot_minus_one = "" . ($GLOBALS['contact_robot_answer'] - 1); + $robot_plus_one = "" . ($GLOBALS['contact_robot_answer'] + 1); + tem_set('robot_minus_one', $robot_minus_one); + tem_set('robot_plus_one', $robot_plus_one); + if(isset($_POST['name'])) { $data = contact_get_fields(); - - $robot_correct = "" . $GLOBALS['contact_robot_answer']; - $robot_minus_one = "" . ($GLOBALS['contact_robot_answer'] - 1); - $robot_plus_one = "" . ($GLOBALS['contact_robot_answer'] + 1); - tem_set('robot_minus_one', $robot_minus_one); - tem_set('robot_plus_one', $robot_plus_one); $host = this_host(); if(!$data['name'] && !$data['email'] && !$data['comments']) { -- 1.7.10.4