'.mysql_error()); mysql_select_db ("$db_name") or die ('Error Selecting DB:
'.mysql_error()); $surname = mysql_real_escape_string($_POST['surname']); $firstname = mysql_real_escape_string($_POST['firstname']); $phone1 = mysql_real_escape_string($_POST['phone1']); $phone2 = mysql_real_escape_string($_POST['phone2']); $location = mysql_real_escape_string($_POST['location']); $qualifications = mysql_real_escape_string($_POST['qualifications']); $expertise = mysql_real_escape_string($_POST['expertise']); $assistance = mysql_real_escape_string($_POST['assistance']); $languages = mysql_real_escape_string($_POST['languages']); $e_mail = mysql_real_escape_string($_POST['e_mail']); $consent = mysql_real_escape_string($_POST['consent']); $published = mysql_real_escape_string($_POST['published']); $comments = mysql_real_escape_string($_POST['comments']); $other_info = mysql_real_escape_string($_POST['other_info']); $errorstring = ""; // default value of errorstring function makeSafe($value) { if (get_magic_quotes_gpc()) { $value = stripslashes($value); } $value = mysql_real_escape_string($value); return $value; } if(isset($_POST['submit'])) { // Validate all the code inputs // Captcha Validation require_once('recaptchalib.php'); $privatekey = "etcetcetc"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly $errorstring = $errorstring. "Invalid CAPTCHA, please try again"; } else { if ($surname =="") $errorstring = $errorstring. "Surname
"; if ($phone1 =="") $errorstring = $errorstring. "phone1
"; if ($phone2 =="") $errorstring = $errorstring. "phone2
"; if ($location =="") $errorstring = $errorstring. "location
"; if ($qualifications =="") $errorstring = $errorstring. "qualifications
"; if ($assistance =="") $errorstring = $errorstring. "assistance
"; if ($languages =="") $errorstring = $errorstring. "languages
"; if ($e_mail =="") $errorstring = $errorstring. "e_mail
"; if ($consent =="") $errorstring = $errorstring. "consent
"; if ($published =="") $errorstring = $errorstring. "published
"; if ($comments =="") $errorstring = $errorstring. "comments
"; if ($other_info =="") $errorstring = $errorstring. "other info
"; // does the errorstring = "nothing"? } // Figure out which error message to show i.e. field validation or CAPTCHA if ($errorstring !="") if (strstr($errorstring,"CAPTCHA")) echo $errorstring; else echo "You have not put anything in the following fields:

$errorstring"; //echo "If you have nothing to put in the box please type the word \"None\" or \"N\/A\""; //die ("Please try again, ensuring that you fill out all the fields!"); else { //echo "Your data has been saved"; $insert_query = "INSERT INTO HelperFormData (surname, firstname, phone1, phone2, location, qualifications, expertise, assistance, languages, e_mail, consent, published, comments, other_info) VALUES ('$surname', '$firstname', '$phone1','$phone2', '$location', '$qualifications', '$expertise', '$assistance', '$languages', '$e_mail', '$consent', '$published', '$comments', '$other_info')"; $insert_action = mysql_query($insert_query) or die ('Error During Insert :
'.mysql_error().'

Error occured running the following code :
'.$insert_query); $id = mysql_insert_id(); echo "Thank you, Your details have been submitted."; //include "resultcard.php"; // Output what the form looks like // End of how the form looks } } if(!isset($_POST['submit']) || (isset($_POST['submit']) && !empty($errorstring))) { ?>
Please complete: This will only take a few moments but please note the format required for Lat and Long otherwise your location will be mis-represented. All fields are required.
      Example Input
  Surname Smith
  First Name Bill
  Phone 1 07777 777777
    The phone on which you are most likely to be reached  
  Phone 2 0118 123 4567
    Alternative number if available, if you don't have one type "none"  
  Location 52.289071,-1.952004
    IMPORTANT: Enter Enter LAT and LONG in DECIMAL DEGREES FORMAT WITH COMMA SEPARATOR (e.g. 51.341551,-1.936684) - it's easy to get this from a Google Map by RIGHT clicking on your location and then clicking on "WHAT'S HERE" - the LAT & LONG will appear in the search line above the map.
  Qualifications

LAA Inspector
Licenced Engineer
G.A. Pilot
Constructor
Microlight Pilot
Other

  Expertise '; } ?> Airframes
Engines
Props
Electrics
Avionics

Airframes
Engines
Props
Electrics
Avionics
Other

  Assistance Offered

Air transport
Ground transport
Accommodation
Aircraft Parts
Engineering
Other:

  Language Skills

English / Spanish

  e_mail

example@mail.net

  Consent Yes
    By selecting YES I accept that the information I have provided will be displayed on an unlisted Google Maps page (Unlisted means: Shared only with other registered members who have been given the map's URL). I also agree not to use the information on this website for purposes other than for which it is intended and I will report any suspected misuse. Whilst Stranded Flyer endeavours to ensure that the information on this website is correct, we do not warrant its completeness or accuracy; nor do we commit to ensuring that the website remains available or that the material on the website is kept up-to-date.
  Published Yes
  Comments As much info as possible 500 characters max
  Where did you hear about stranded flyer