(demographics, location, gender, age, income)"; $questions['2']['C'] = "Describe the product or service the new website is intended to provide:"; $questions['2']['D'] = "What is the main thing you want a person to do when visiting your website?
(eg: call you, buy a product, subscribe to a newsletter, donate, gain information)"; $questions['2']['E'] = "Who are your main competitors?
(please provide their website addresses if known)"; $questions['3']['A'] = "Do you have a budget already established for this project?"; $questions['3']['B'] = "Do you already have a domain name or have one in mind?"; $questions['3']['C'] = "Is there a timescale for the project?
(tell us if there is an immovable deadline, eg: product launch, trade show, new season)"; $questions['3']['D'] = "What are your main keywords for SEO (search engine optimisation)?
(these are the words/phrases that people would Google to find your website)"; $questions['4']['A'] = "Do you have an existing brand/identity/logo?
(if yes then please describe)"; $questions['4']['B'] = "How should your new site look?
(use adjectives eg: professional, fun, homely, corporate, modern, traditional, understated)"; $questions['4']['C'] = "Name some websites you like/dislike and what it is about them you like/dislike?"; $questions['4']['D'] = "Do you have any additional print requirements?
(eg: business stationary, brochures, flyers, postcards, posters)"; $questions['5']['A'] = "If there is anything that we haven’t covered please give details here:"; // hummm // $questions2 = str_replace("
", "\n", $questions); function ShowForm($error,$HTTP_POST_VARS,$questions) { //For re-population of data on error return. if (!isset($_POST['_submit_check'])) { $_POST['Q1A']= ""; $_POST['Q1B']= ""; $_POST['Q1C']= ""; $_POST['Q1D']= ""; $_POST['Q1E']= ""; $_POST['Q2A']= ""; $_POST['Q2B']= ""; $_POST['Q2C']= ""; $_POST['Q2D']= ""; $_POST['Q2E']= ""; $_POST['Q3A']= ""; $_POST['Q3B']= ""; $_POST['Q3C']= ""; $_POST['Q3D']= ""; $_POST['Q4A']= ""; $_POST['Q4B']= ""; $_POST['Q4C']= ""; $_POST['Q4D']= ""; $_POST['Q5A']= ""; // $_POST['Q5B']= ""; } else { } ?> Website Project Planner
Small BLue Twitter Facebook 08450 727 234

Website Project Planner

Thanks for considering us for your website project. Completing the project planner will help us to gain a good understanding of your project from the start. The project planner is divided in to 5 easy sections, please fill it out to the best of your abilities and click on the submit button.



' . $error . '

'; } ?>
1 - Contact Information

2 - Business / Organisation

3 - Project Details

4 - Look & Feel

5 - Additional Information





filledOutItem($post['Q1A'])) { $Validator->addError("ERROR: Please enter your full name and re-submit the form."); $error = $Validator->listErrors(); return 0; } // name to long if( strlen($post['Q1A']) > 75 ) { $Validator->addError("ERROR: Name must be less than 75 characters."); $error = $Validator->listErrors(); return 0; } // telephone number present if(!$Validator->filledOutItem($post['Q1C'])) { $Validator->addError("ERROR: Please enter your telephone number and re-submit the form."); $error = $Validator->listErrors(); return 0; } // email present and correct if (isset($post['Q1D']) && $post['Q1D'] != "") { if(!$Validator->validateEmail($post['Q1D'])) { $Validator->addError("ERROR: You must enter a valid email address."); $error = $Validator->listErrors(); return 0; } } // NO ERRORS WITH THE FORM SO RETURN TRUE. return 1; } function ProcessForm($error,$post,$questions) { // Tidy up the data input. $post['Q1A'] = trim( $post['Q1A'] ); SendEmail($post,$questions); // Re-Direct the entrant to a thankyou page. header('Location: project-planner-received-thanks.html'); exit; } function SendEmail($post,$questions) { // SETUP DEBUG LOGGING if( DEBUG_LOGGING ) { $log = new Logger(MAIN_LOG_FILE); } // replace html line-breaks with normal line-breaks $questions = str_replace("
", "\n", $questions); $subject = "SBIS PP " . $post['Q1A'] . " " . $post['Q1D']; $to = "george@smallblue.net"; // FROM ADDRESS $headers = 'From: info@smallblue.net' . "\r\n" . 'Reply-To: info@smallblue.net' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); // OUTPUT MAIL HEADER TO LOG FILE if( DEBUG_LOGGING ) { $log->write( $headers ); } $body = "\n\n"; $body .= "Q1A - " . $questions['1']['A'] . "\n" . $post['Q1A'] . "\n\n"; $body .= "Q1B - " . $questions['1']['B'] . "\n" . $post['Q1B'] . "\n\n"; $body .= "Q1C - " . $questions['1']['C'] . "\n" . $post['Q1C'] . "\n\n"; $body .= "Q1D - " . $questions['1']['D'] . "\n" . $post['Q1D'] . "\n\n"; $body .= "Q1E - " . $questions['1']['E'] . "\n" . $post['Q1E'] . "\n\n"; $body .= "Q2A - " . $questions['2']['A'] . "\n" . $post['Q2A'] . "\n\n"; $body .= "Q2B - " . $questions['2']['B'] . "\n" . $post['Q2B'] . "\n\n"; $body .= "Q2C - " . $questions['2']['C'] . "\n" . $post['Q2C'] . "\n\n"; $body .= "Q2D - " . $questions['2']['D'] . "\n" . $post['Q2D'] . "\n\n"; $body .= "Q2E - " . $questions['2']['E'] . "\n" . $post['Q2E'] . "\n\n"; $body .= "Q3A - " . $questions['3']['A'] . "\n" . $post['Q3A'] . "\n\n"; $body .= "Q3B - " . $questions['3']['B'] . "\n" . $post['Q3B'] . "\n\n"; $body .= "Q3C - " . $questions['3']['C'] . "\n" . $post['Q3C'] . "\n\n"; $body .= "Q3D - " . $questions['3']['D'] . "\n" . $post['Q3D'] . "\n\n"; $body .= "Q4A - " . $questions['4']['A'] . "\n" . $post['Q4A'] . "\n\n"; $body .= "Q4B - " . $questions['4']['B'] . "\n" . $post['Q4B'] . "\n\n"; $body .= "Q4C - " . $questions['4']['C'] . "\n" . $post['Q4C'] . "\n\n"; $body .= "Q4D - " . $questions['4']['D'] . "\n" . $post['Q4D'] . "\n\n"; $body .= "Q5A - " . $questions['5']['A'] . "\n" . $post['Q5A'] . "\n\n"; // $body .= "Q5B: " . $post['Q5A'] . "\n\n"; $body .= "****************************************************************\n\n"; // OUTPUT MAIL BODY TO LOG FILE if( DEBUG_LOGGING ) { $log->write( $body ); } if (mail($to, $subject, $body, $headers)) { // DEBUG // echo("

Message successfully sent!

"); // exit; if( DEBUG_LOGGING ) { $log->write( "Success: EMAIL SENT" ); } return true; } else { // DEBUG // echo("

Message delivery failed...

"); // exit; if( DEBUG_LOGGING ) { $log->write( "Failure: EMAIL NOT SENT" ); } return false; } } $error = ''; if (array_key_exists('_submit_check',$_POST)) { // If validate_form() returns errors, pass them to show_form() if (!ValidateForm($error,$_POST)) { ShowForm($error,$_POST,$questions); } else { ProcessForm($error, $_POST, $questions); // The submitted data is valid, so process it. exit; } } else { ShowForm($error,$_POST,$questions); // The form wasn't submitted, so display it now. } // The End ?>