vishwamano

source of vishwamano.com
git clone git://git.ricketyspace.net/vishwamano.git
Log | Files | Refs

commit 91e01666aef8c2fe7cc5fc0be51bda6ca7ed8f9c
parent e26c65005d407f81852ae1fdce38949e877b29dd
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Thu, 27 Jun 2013 19:31:06 +0530

the reg form at as/ asks for opt. phone number now.

Diffstat:
as/index.html | 7++++++-
as/reg-handler.php | 11++++++++---
2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/as/index.html b/as/index.html @@ -124,7 +124,6 @@ <input type="text" id="name" name="name" placeholder="Spock" required> </div> </div> - <div class="control-group"> <label class="control-label" for="email">Email</label> <div class="controls"> @@ -132,6 +131,12 @@ </div> </div> <div class="control-group"> + <label class="control-label" for="phone">Phone Number</label> + <div class="controls"> + <input type="tel" id="phone" name="phone" placeholder="31-4159-2653"> + </div> + </div> + <div class="control-group"> <label class="control-label" for="blurb"> Tell us about yourself </label> <div class="controls"> <textarea id="blurb" name="blurb" rows="3" diff --git a/as/reg-handler.php b/as/reg-handler.php @@ -10,6 +10,7 @@ $myemail = 'vishwa91photography@gmail.com'; $name = $_POST['name']; $email_address = $_POST['email']; +$phone = $_POST['phone']; $blurb = $_POST['blurb']; $humantest = $_POST['humantest']; @@ -17,9 +18,9 @@ $humantest_answer= "101"; if(strcmp($humantest, $humantest_answer)==0) { - if(empty($_POST['name']) || - empty($_POST['email']) || - empty($_POST['blurb'])) { + if(empty($name) || + empty($email_address) || + empty($blurb)) { // redirect to the mesg-error page header('Location: /as/reg-error.html'); return; @@ -29,6 +30,10 @@ if(strcmp($humantest, $humantest_answer)==0) $email_body = "$name <$email_address> has registered for the A&S Basic Level 1 Weekend Photography Course \n\n". "About $name:\n\n $blurb"; + + if(!empty($phone)) { + $email_body .= "\n\n $name can be buzzed at $phone"; + } $headers = "From: no-reply@vishwamano.com\n"; $headers .= "Reply-To: $email_address";