Jump to content

justspiffy

Members
  • Posts

    32
  • Joined

  • Last visited

Posts posted by justspiffy

  1. Hey everyone,

     

    I purchased a template to make a website with and need a little bit of help with altering the contact form. The form works fine, when someone fills out the form online and the email comes to me, the reply to email address is the one they inputted into the form. However, when I click "reply" in the email, it changes to my email address(the $fromEmail which I was trying to override)

     

    Here is the send.php

     

    <?php
    $ajax = (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
    $ajax = true;
    //we do not allow direct script access
    if (!$ajax) {
    	//redirect to contact form
    	echo "Please enable Javascript";
    	exit;
    }
    require_once "config.php";
    
    //we set up subject
    $mail->Subject = isset($_REQUEST['email_subject']) ? $_REQUEST['email_subject'] : "Message from site";
    
    //let's validate and return errors if required
    $data = $mail->validateDynamic(array('required_error' => $requiredMessage, 'email_error' => $invalidEmail), $_REQUEST);
    
    //let's make sure we have valid data
    //if (!$data['errors'] && (!isset($_REQUEST['js']) || $_REQUEST['js'] != 1)) {
    //$data['errors']['global'] = 'Javascript is required. Please try again';
    //}
    
    if ($data['errors']) {
    	echo json_encode(array('errors' => $data['errors']));
    	exit;
    }
     
    //force to overwrite email address
    $mail->SetFrom($data['fields']['Email'], $data['fields']['Name'].' '.$data['fields']['Surname']);
    
    $html = '<body style="margin: 10px;">
    <div style="width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;">
      <h2>' . $mail->Subject . '</h2>
    ';
    
    foreach ($data['fields'] as $label => $val) {
    	$html .= '<p>' . $label . ': ' . $val . '</p>';
    }
    
    $html .= '</div></body>';
    
    $mail->setup($html, $_REQUEST, array());
    
    $result = array('success' => 1);
    if (!$mail->Send()) {
    	$result['success'] = 0;
    }
    
    echo json_encode($result);
    exit;
    

    config.php

    <?php
    /**
     * Setup mail server config
     */
    ini_set('display_errors', 0);
    
    //where we would like to send email
    $recipientEmail = 'contact@justspiffy.ca';
    $recipientName = 'The Touchmark';
    
    //Address which will be visible in "From" field
    $fromEmail = 'contact@justspiffy.ca';
    $fromName = 'Site Admnistrator';
    
    //Validation error messages
    $requiredMessage = 'Field is required';
    $invalidEmail = 'Invalid email';
    
    /**
     * Advanced configuration - no need to modify
     */
    
    require_once(dirname(__FILE__) . '/vendor/ctPHPMailer.php');
    $mail = new ctPHPMailer();
    
    //set your email address
    $mail->AddAddress($recipientEmail, $recipientName);
    $mail->SetFrom($fromEmail, $fromName);
    
    $debug = false; //if problems occur, set to true to view debug messages
    
    

    I do not know much about php so I am not sure what to do to make it stay as the users email address when they click "reply" on the email. Any ideas would be great.

     

     

  2. Hi there,

     

    I have created a simple php email form, which works just fine, but now I have been asked to include an image of the company logoat the top of the email the user receives. I am new to php, so my first thought was that I could just add a line that had the path to the image on the server like so: $mailimg = 'http://domain.ca/images/image.gif'; and then call it in the $message:

    $headers = "From: $email\r\n\r\n";

    $subject = "Cancellation Request Form from Website";

    $message .= "$mailimg";

    $message = "Notice Date: $ndate\r

    Brokerage: $brokerage\r

     

    but that doesnt seem to be working for me. I get the email message, but with no image attached. Any ideas on how I can simply do this. Again I am new to php, so the easier the better

     

    Here is my code

    <?php
    if ($_SERVER['REQUEST_METHOD'] != 'POST'){
          $me = $_SERVER['PHP_SELF'];
    
    ?>
              <form name="form1" method="post"
             action="<?php echo $me;?>">
                <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><img src="../images/dot_trans.gif" width="2" height="2" /><br />
            <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><img src="../images/dot_trans.gif" width="10" height="10" /><br />
              <table width="100%" height="183" border="0" align="center" cellpadding="3" cellspacing="3">
                    <tr>
                      <td width="147"><strong>Notice Date</strong></td>
                      <td width="263"><span id="sprytextfield1">
                        <label>
                          <input name="ndate" type="text" id="ndate" size="40" />
                          </label>
                        <span class="textfieldRequiredMsg">Please Enter Notice Date.</span></span></td>
                      <td width="127"><strong>Broker Name</strong></td>
                      <td width="271"><span id="sprytextfield7">
                        <input name="brokername" type="text" id="brokername" size="40" />
                        <span class="textfieldRequiredMsg">Please Enter Broker Name.</span></span></td>
                    </tr>
                    <tr>
                      <td><strong>Brokerage</strong></td>
                      <td><span id="sprytextfield2">
                        <label>
                          <input name="brokerage" type="text" id="brokerage" size="40" />
                        </label>
                        <span class="textfieldRequiredMsg">Please Enter Brokerage</span></span></td>
                      <td><strong>Phone Number</strong></td>
                      <td><span id="sprytextfield8">
                        <input name="pnum" type="text" id="pnum" size="40" />
                        <span class="textfieldRequiredMsg">Please Enter A Phone Number.</span></span></td>
                      </tr>
                    <tr>
                      <td><strong>RJFC Contract #</strong></td>
                      <td><span id="sprytextfield3">
                        <input name="rjfccon" type="text" id="rjfccon" size="40" />
                        <span class="textfieldRequiredMsg">Please Enter A Contact Number</span></span></td>
                      <td><strong>E Mail</strong></td>
                      <td><span id="sprytextfield9">
                      <input name="email" type="text" id="email" size="40" />
                      <span class="textfieldRequiredMsg">Please Enter A E Mail Address.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                      </tr>
                    <tr>
                      <td height="28"><strong>Insured</strong></td>
                      <td><span id="sprytextfield4">
                        <input name="insured" type="text" id="insured" size="40" />
                        <span class="textfieldRequiredMsg">Please Enter Name of Insured</span></span></td>
                      <td rowspan="3" valign="top"><strong>Reason for cancellation</strong></td>
                      <td rowspan="3"><label for="cancel"></label>
                        <span id="sprytextarea1">
                        <textarea name="cancel" id="cancel" cols="30" rows="5"></textarea>
                        <span class="textareaRequiredMsg">Please enter a reason for cancellation.</span></span></td>
                      </tr>
                    <tr>
                      <td height="28"><strong>Policy #</strong></td>
                      <td><span id="sprytextfield5">
                        <input name="polnum" type="text" id="polnum" size="40" />
                        <span class="textfieldRequiredMsg">Please Enter A Policy Number.</span></span></td>
                      </tr>
                    <tr>
                      <td height="22"> </td>
                      <td> </td>
                    </tr>
                    </table>
              <br />
              <br />
              <table width="822" align="center" cellpadding="0" cellspacing="0">
              
                <tr>
                  <td width="569"><div align="left">RJFC will process the Cancellation Request    upon receipt.  All documents will be    sent to the    Insured by registered mail.  A fax or    e-mail copy of the documents will be sent to the Broker and Insurer.                </div>                <p> </p></td>
                </tr>
            </table>
              <table width="97%" border="0" align="center" cellpadding="3" cellspacing="3">
                <tr>
                        <td width="801"><div align="center">
                          <label>
                            <input name="Submit" type="submit" value="Submit" />
                            </label>
                          <label>
                            <input name="reset" type="reset" id="reset" value="Reset" />
                            </label>
                          </div></td>
                      </tr>
            </table>
               
                <img src="../images/dot_trans.gif" width="10" height="10" /></td>
            </tr>
          </table>
          
          <img src="../images/dot_trans.gif" width="2" height="2" /></td>
        </tr>
      </table>
    </form>
    <?php
    } else {
    error_reporting(0);
    $recipient = 'contact@justspiffy.ca';
    $ndate = stripslashes($_POST['ndate']);
    $brokerage = stripslashes($_POST['brokerage']);
    $rjfccon = stripslashes($_POST['rjfccon']);
    $insured = stripslashes($_POST['insured']);
    $polnum = stripslashes($_POST['polnum']);
    $brokername = stripslashes($_POST['brokername']);
    $pnum = stripslashes($_POST['pnum']);
    $email = stripslashes($_POST['email']);
    $cancel = stripslashes($_POST['cancel']);
    $mailimg = 'http://rjfc.ca/new/images/quote.gif';
    
    putenv ("QMAILUSER=contact");
    putenv ("QMAILNAME=contact@justspiffy.ca");
    putenv ("QMAILHOST=justspiffy.ca");
    
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: multipart/mixed;charset=us-ascii\r\n";
    $headers .= "From: contact@justspiffy.ca";
    
    
    
    $headers = "From: $email\r\n\r\n";
    $subject = "Cancellation Request Form from Website";
    $message .= "$mailimg";
    $message = "Notice Date: $ndate\r
    Brokerage: $brokerage\r
    RJFC Contact Number: $rjfccon\r
    Insured: $insured\r
    Policy Number: $polnum\r
    Broker Name: $brokername\r
    Phone Number: $pnum\r
    Email: $email\r
    Reason for cancellation: $cancel\r
    
    
          "; 
          mail($recipient, $subject, $message, $headers);
          if (!mail) {
              echo "Message failed to send";
          } else {
              echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you.  Your request has been sent.  A representative from RJFC will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>");
          }
    }
    ?>
    

  3. Hi there,

     

    A client of mine has asked me to make them a form for their website, which I have completed without any issues. It emails them the information from the form, but now they are asking me if I can make it so it emails them it in a XML attachment so they can use it to import the data into this software they are using. I do not know anything about XML, and I only know basic PHP. I wonder if anyone can me some pointers on what I need to do from here. Here is the code I used for the form.

     

     

      <?php
    if ($_SERVER['REQUEST_METHOD'] != 'POST'){
          $me = $_SERVER['PHP_SELF'];
    
    ?>
          <form name="form1" method="post"
             action="<?php echo $me;?>">
    
    
    <FORM> .....</FORM>
    
    <?php
       } else {
          error_reporting(0);
          $recipient = 'contact@justspiffy.ca';
      $in_name = stripslashes($_POST['i_name']);
          $la_name = stripslashes($_POST['l_name']);
          $in_street = stripslashes($_POST['i_street']);
      $in_city_prov = stripslashes($_POST['i_city_prov']);
      $in_pcode = stripslashes($_POST['i_pcode']);
          $in_phone = stripslashes($_POST['i_phone']);
          $brokerage = stripslashes($_POST['brokerage']);
      $br_street = stripslashes($_POST['b_street']);
          $br_city_prov = stripslashes($_POST['b_city_prov']);
      $br_pcode = stripslashes($_POST['b_pcode']);
      $br_phone = stripslashes($_POST['b_phone']);
          $ext = stripslashes($_POST['ext']);
      $br_con_nam = stripslashes($_POST['b_con_nam']);
      $br_con_email = stripslashes($_POST['b_con_email']);
          $financed = stripslashes($_POST['p_financed']);
          $p_num1 = stripslashes($_POST['pol_num1']);
      $mon1 = stripslashes($_POST['month1']);
      $day1 = stripslashes($_POST['day1']);
          $yr1 = stripslashes($_POST['year1']);
      $ins_com1 = stripslashes($_POST['ins_com1']);
      $type1 = stripslashes($_POST['type1']);
          $t_mon_yr1 = stripslashes($_POST['term_mon_yr1']);
      $prem1 = stripslashes($_POST['premium1']);
          $fee1 = stripslashes($_POST['fees1']);
          $cfee1 = stripslashes($_POST['cfees1']);
          $tax1 = stripslashes($_POST['tax1']);
      $p_num2 = stripslashes($_POST['pol_num2']);
      $mon2 = stripslashes($_POST['month2']);
      $day2 = stripslashes($_POST['day2']);
          $yr2 = stripslashes($_POST['year2']);
      $ins_com2 = stripslashes($_POST['ins_com2']);
      $type2 = stripslashes($_POST['type2']);
          $t_mon_yr2 = stripslashes($_POST['term_mon_yr2']);
      $prem2 = stripslashes($_POST['premium2']);
          $fee2 = stripslashes($_POST['fees2']);
      $cfee2 = stripslashes($_POST['cfees2']);
          $tax2 = stripslashes($_POST['tax2']);
      $p_num3 = stripslashes($_POST['pol_num3']);
      $mon3 = stripslashes($_POST['month3']);
      $day3 = stripslashes($_POST['day3']);
          $yr3 = stripslashes($_POST['year3']);
      $ins_com3 = stripslashes($_POST['ins_com3']);
      $type3 = stripslashes($_POST['type3']);
          $t_mon_yr3 = stripslashes($_POST['term_mon_yr3']);
      $prem3 = stripslashes($_POST['premium3']);
          $fee3 = stripslashes($_POST['fees3']);
      $cfee3 = stripslashes($_POST['cfees3']);
          $tax3 = stripslashes($_POST['tax3']);
      $p_num4 = stripslashes($_POST['pol_num4']);
      $mon4 = stripslashes($_POST['month4']);
      $day4 = stripslashes($_POST['day4']);
          $yr4 = stripslashes($_POST['year4']);
      $ins_com4 = stripslashes($_POST['ins_com4']);
      $type4 = stripslashes($_POST['type4']);
          $t_mon_yr4 = stripslashes($_POST['term_mon_yr4']);
      $prem4 = stripslashes($_POST['premium4']);
          $fee4 = stripslashes($_POST['fees4']);
      $cfee4 = stripslashes($_POST['cfees4']);
          $tax4 = stripslashes($_POST['tax4']);
      $p_num5 = stripslashes($_POST['pol_num5']);
      $mon5 = stripslashes($_POST['month5']);
      $day5 = stripslashes($_POST['day5']);
          $yr5 = stripslashes($_POST['year5']);
      $ins_com5 = stripslashes($_POST['ins_com5']);
      $type5 = stripslashes($_POST['type5']);
          $t_mon_yr5 = stripslashes($_POST['term_mon_yr5']);
      $prem5 = stripslashes($_POST['premium5']);
          $fee5 = stripslashes($_POST['fees5']);
      $cfee5 = stripslashes($_POST['cfees5']);
          $tax5 = stripslashes($_POST['tax5']);
      $p_num6 = stripslashes($_POST['pol_num6']);
      $mon6 = stripslashes($_POST['month6']);
      $day6 = stripslashes($_POST['day6']);
          $yr6 = stripslashes($_POST['year6']);
      $ins_com6 = stripslashes($_POST['ins_com6']);
      $type6 = stripslashes($_POST['type6']);
          $t_mon_yr6 = stripslashes($_POST['term_mon_yr6']);
      $prem6 = stripslashes($_POST['premium6']);
          $fee6 = stripslashes($_POST['fees6']);
      $cfee6 = stripslashes($_POST['cfees6']);
          $tax6 = stripslashes($_POST['tax6']);
      $p_num7 = stripslashes($_POST['pol_num7']);
      $mon7 = stripslashes($_POST['month7']);
      $day7 = stripslashes($_POST['day7']);
          $yr7 = stripslashes($_POST['year7']);
      $ins_com7 = stripslashes($_POST['ins_com7']);
      $type7 = stripslashes($_POST['type7']);
          $t_mon_yr7 = stripslashes($_POST['term_mon_yr7']);
      $prem7 = stripslashes($_POST['premium7']);
          $fee7 = stripslashes($_POST['fees7']);
      $cfee7 = stripslashes($_POST['cfees7']);
          $tax7 = stripslashes($_POST['tax7']);
      $p_num8 = stripslashes($_POST['pol_num8']);
      $mon8 = stripslashes($_POST['month8']);
      $day8 = stripslashes($_POST['day8']);
          $yr8 = stripslashes($_POST['year8']);
      $ins_com8 = stripslashes($_POST['ins_com8']);
      $type8 = stripslashes($_POST['type8']);
          $t_mon_yr8 = stripslashes($_POST['term_mon_yr8']);
      $prem8 = stripslashes($_POST['premium8']);
          $fee8 = stripslashes($_POST['fees8']);
      $cfee8 = stripslashes($_POST['cfees8']);
          $tax8 = stripslashes($_POST['tax8']);
    
                
          $headers = "From: $br_con_email\r\n\r\n";
          $subject = "Quick Quote Form from Website";
          $message = "First Name: $in_name\r\n
          Last Name: $la_name\r\n
          Insured Street Address: $in_street\r\n
          Insured City & Province: $in_city_prov\r\n
          Insured Postal Code: $in_pcode\r\n
          Insured Phone Number: $in_phone\r\n
          Brokerage: $brokerage\r\n
      Broker Street Address: $br_street\r\n
      Broker City & Province: $br_city_prov\r\n
      Broker Postal Code: $br_pcode\r\n
      Broker Phone Number: $br_phone\r\n
          Broker Phone Ext: $ext\r\n
      Broker Name: $br_con_nam\r\n
      Broker Email: $br_con_email\r\n
          Policy Number: $p_num1   Effective Date: $mon1 $day1 $yr1  Ins. Company: $ins_com1   Type Of Coverage: $type1   Term: $t_mon_yr1   Policy Premium: $prem1  Policy Fee: $fee1   Company Fee: $cfee1   Sales Tax: $tax1 \r\n
          Policy Number: $p_num2   Effective Date: $mon2 $day2 $yr2  Ins. Company: $ins_com2   Type Of Coverage: $type2   Term: $t_mon_yr2   Policy Premium: $prem2  Policy Fee: $fee2   Company Fee: $cfee2   Sales Tax: $tax2 \r\n
      Policy Number: $p_num3   Effective Date: $mon3 $day3 $yr3  Ins. Company: $ins_com3   Type Of Coverage: $type3   Term: $t_mon_yr3   Policy Premium: $prem3  Policy Fee: $fee3   Company Fee: $cfee3   Sales Tax: $tax3 \r\n
      Policy Number: $p_num4   Effective Date: $mon4 $day4 $yr4  Ins. Company: $ins_com4   Type Of Coverage: $type4   Term: $t_mon_yr4   Policy Premium: $prem4  Policy Fee: $fee4   Company Fee: $cfee4   Sales Tax: $tax4 \r\n
      Policy Number: $p_num5   Effective Date: $mon5 $day5 $yr5  Ins. Company: $ins_com5   Type Of Coverage: $type5   Term: $t_mon_yr5   Policy Premium: $prem5  Policy Fee: $fee5   Company Fee: $cfee5   Sales Tax: $tax5 \r\n
      Policy Number: $p_num6   Effective Date: $mon6 $day6 $yr6  Ins. Company: $ins_com6   Type Of Coverage: $type6   Term: $t_mon_yr6   Policy Premium: $prem6  Policy Fee: $fee6   Company Fee: $cfee6   Sales Tax: $tax6 \r\n
      Policy Number: $p_num7   Effective Date: $mon7 $day7 $yr7  Ins. Company: $ins_com7   Type Of Coverage: $type7   Term: $t_mon_yr7   Policy Premium: $prem7  Policy Fee: $fee7   Company Fee: $cfee7   Sales Tax: $tax7 \r\n
      Policy Number: $p_num8   Effective Date: $mon8 $day8 $yr8  Ins. Company: $ins_com8   Type Of Coverage: $type8   Term: $t_mon_yr8   Policy Premium: $prem8  Policy Fee: $fee8   Company Fee: $cfee8   Sales Tax: $tax8 \r\n
      
    
          "; 
          mail($recipient, $subject, $message, $headers);
          if (!mail) {
              echo "Message failed to send";
          } else {
              echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you. Your request has been sent and we will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>");
          }
    }
    ?>
    
    

  4. When I use that code you provided me, it work, except it attempts to send the form through and loads a blank page with the pop up. Is there a way to do it so it just gives the pop up and stays on the same page with the form still open and everything they have put in the form still there?

     

    Also, and this may be what you were talking about..

     

    When i put a incorrect passcode in the CAPTCHA it gives me the error, but when i click back and put the correct one in, it still says it is wrong??

    The only way I found around it is when I hit refresh and type it in, then it will send. Even if I put the incorrect passcode in it still sends ha. Not sure why that is? :(

  5. I tried using some javascript (though I dont know to much about it) but it didnt seem to work for me.

     

    I tried the following:

     

    <?php

      } else {

          error_reporting(0);

     

    require_once('recaptchalib.php');

    $privatekey = "6Lc3CAoAAAAAACXdton7ORpQm_C23NwVdumiRFWK";

    $resp = recaptcha_check_answer ($privatekey,

    $_SERVER["REMOTE_ADDR"],

    $_POST["recaptcha_challenge_field"],

    $_POST["recaptcha_response_field"]);

    if (!$resp->is_valid) {

     

    die('<script type="text/javascript">

    alert("The reCAPTCHA wasn't entered correctly. Go back and try it again." .

    "(reCAPTCHA said: " . $resp->error . ")");

    </script>

    }

     

    but it didnt work :(

     

    am i close? ha

  6. Hey guys,

     

    Just a quick questions Im wondering if someone can help me with. I have created a form and it uses CAPTCHA to verify the person filling out the form is human. If they will the form out and put the wrong word into the CAPCTHA field, it loads an error on a new page that says "he reCAPTCHA wasn't entered correctly. Go back and try it again." What i would like it to do, instead of loading in a new page and them losing the information they have put in the form, is for a pop up to come up and give the error instead.

     

    Anyone know how I could go about that?

     

    Here is the code:

     

    <?php
       } else {
          error_reporting(0);
      
    
    require_once('recaptchalib.php');
    $privatekey = "6Lc3CAoAAAAAACXdton7ORpQm_C23NwVdumiRFWK";
    $resp = recaptcha_check_answer ($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);
    if (!$resp->is_valid) {
    die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
    "(reCAPTCHA said: " . $resp->error . ")");
    }
    
      
          $recipient = 'contact@justspiffy.ca';
      $Num_ID = stripslashes($_POST['ID_Number']);
      $confirmation = md5($ID_Number . time());
          $First_Name = stripslashes($_POST['Surname']);
      $Last_Name = stripslashes($_POST['Given_name']);
      $Email_Address = stripslashes($_POST['Email_Address']);
          $Change_Con = stripslashes($_POST['Contact_Change']);
          $Curr_Addy = stripslashes($_POST['Address']);
      $Curr_Municipality = stripslashes($_POST['Municipality']);
          $Curr_Province = stripslashes($_POST['Province']);
      $PostalCode = stripslashes($_POST['Postal_Code']);
          $Curr_Home = stripslashes($_POST['Phone_Home']);
          $Curr_Work = stripslashes($_POST['Phone_Work']);
          $Work_Ext = stripslashes($_POST['Phone_Work_Extension']);
      $Cred_Type = stripslashes($_POST['Card_Type']);
      $Curr_Card_Name = stripslashes($_POST['CreditCardName']);
          $Curr_Card_Num = stripslashes($_POST['CardNumber']);
          $Curr_Card_Num1 = stripslashes($_POST['CardNumber1']);
          $Curr_Card_Num2 = stripslashes($_POST['CardNumber2']);
          $Curr_Card_Num3 = stripslashes($_POST['CardNumber3']);
      $Month_Exp = stripslashes($_POST['Expiry_Month']);
          $Year_Exp = stripslashes($_POST['Expiry_Year']);
          $Paid_Amo = stripslashes($_POST['Amount_Paid']);
      $Name_Vet = stripslashes($_POST['vet_clinic_name']);
      $Name_Ani1 = stripslashes($_POST['Animal1_Name']);
          $Rab_Ani1_Mon = stripslashes($_POST['Rabies_Month_Animal1']);
          $Rab_Ani1_Year = stripslashes($_POST['Rabies_Year_Animal1']);
          $Name_Ani2 = stripslashes($_POST['Animal2_Name']);
          $Rab_Ani2_Mon = stripslashes($_POST['Rabies_Month_Animal2']);
      $Rab_Ani2_Year = stripslashes($_POST['Rabies_Year_Animal2']);
      $Name_Ani3 = stripslashes($_POST['Animal3_Name']);
      $Rab_Ani3_Mon = stripslashes($_POST['Rabies_Month_Animal3']);
      $Rab_Ani3_Year = stripslashes($_POST['Rabies_Year_Animal3']);
      $Cat_Dog = stripslashes($_POST['DogOrCat']);
      $Comment = stripslashes($_POST['Notes']);
          
          $sendto = $_POST['Email_Address'];
          $headers = "From: $recipient\r\n\r\n";
          $subject = "Licence Renewal Request $confirmation\n";
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.
    
    			  Your confirmation Id is $confirmation\n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $Num_ID\r\n
          Name: $First_Name  $Last_Name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Change_Con\r\n
          Address: $Curr_Addy\r\n
          Municipality: $Curr_Municipality\r\n
          Province: $Curr_Province\r\n
      Postal Code: $PostalCode\r\n
          Phone # - Home: $Curr_Home\r\n
          Phone # - Work: $Curr_Work\r\n
          Work Ext: $Work_Ext\r\n
          Card Type: $Cred_Type\r\n
          Name of Cardholder: $Curr_Card_Name\r\n
          Card #: XXXX-XXXX-XXXX-$Curr_Card_Num3\r\n
          Expiry Date: $Month_Exp  $Year_Exp\r\n
          Please indicate amount to be paid: $Paid_Amo\r\n
          Veterinarian Clinic Name: $Name_Vet\r\n
          Name of First Animal: $Name_Ani1\r\n
          Month and Year of Vaccination: $Rab_Ani1_Mon  $Rab_Ani1_Year\r\n
      Name of Second Animal: $Name_Ani2\r\n
          Month and Year of Vaccination: $Rab_Ani2_Mon  $Rab_Ani2_Year\r\n
          Name of Third Animal: $Name_Ani3\r\n
          Month and Year of Vaccination: $Rab_Ani3_Mon  $Rab_Ani3_Year\r\n
          Breed Certification: $Cat_Dog\r\n
          Notes: $Comment\r\n
          ";
          // Send mail to customer, refer to http://php.net/manual/en/function.mail.php
          mail($sendto, $subject, $message, $headers);
          if (!mail) {
              echo "Message failed to send, please notify our Web Team.";
          } else {
              echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you. Your request has been sent and we will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>");
          }
          // Send mail to company
          $to = "contact@justspiffy.ca"; // who gets this one?
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.<br />
    
    			  Your confirmation Id is $confirmation\n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $Num_ID\r\n
          Name: $First_Name  $Last_Name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Change_Con\r\n
          Address: $Curr_Addy\r\n
          Municipality: $Curr_Municipality\r\n
          Province: $Curr_Province\r\n
      Postal Code: $PostalCode\r\n
          Phone # - Home: $Curr_Home\r\n
          Phone # - Work: $Curr_Work\r\n
          Work Ext: $Work_Ext\r\n
          Card Type: $Cred_Type\r\n
          Name of Cardholder: $Curr_Card_Name\r\n
          Card #: $Curr_Card_Num  $Curr_Card_Num1  $Curr_Card_Num2  $Curr_Card_Num3\r\n
          Expiry Date: $Month_Exp  $Year_Exp\r\n
          Please indicate amount to be paid: $Paid_Amo\r\n
          Veterinarian Clinic Name: $Name_Vet\r\n
          Name of First Animal: $Name_Ani1\r\n
          Month and Year of Vaccination: $Rab_Ani1_Mon  $Rab_Ani1_Year\r\n
      Name of Second Animal: $Name_Ani2\r\n
          Month and Year of Vaccination: $Rab_Ani2_Mon  $Rab_Ani2_Year\r\n
          Name of Third Animal: $Name_Ani3\r\n
          Month and Year of Vaccination: $Rab_Ani3_Mon  $Rab_Ani3_Year\r\n
          Breed Certification: $Cat_Dog\r\n
          Notes: $Comment\r\n
          ";
          mail($to, $subject, $message, $headers);
           if (!mail) {
              echo "Message failed to send. Please notify our Web Team.";
          } else {
              // something here to notify the web team if it fails.
          }
    }
    ?>
    

     

  7. thank you for your reply. I tried doing what you said but it doesnt look like it is working.  When i hit "submit" i get a page cannot be displayed. It shows the info from the form in the subject line, which i doubt is safe when they are inputting their credit card information.

     

    here is my code - renewal.php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Cat & Dog Tag Renewal Form</title>
    <script language="javascript" type="text/javascript">
    <!--
    //<![CDATA[
    var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" :
    "http://www.trustlogo.com/trustlogo/javascript/trustlogo.js";
    document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
    //]]>
    
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_validateForm() { //v4.0
      var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
      for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
        if (val) { nm=val.name; if ((val=val.value)!="") {
          if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
            if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
          } else if (test!='R') { num = parseFloat(val);
            if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
            if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
              min=test.substring(8,p); max=test.substring(p+1);
              if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
        } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
      } if (errors) alert('The following error(s) occurred:\n'+errors);
      document.MM_returnValue = (errors == '');
    }
    
    
    //-->
    </script>
    
    </head>
    
    <body topmargin ="0" leftmargin="0" marginwidth="0" marginheight="0" onLoad="createExpiry();">
    
    <p><img border="0" src="images/header.jpg" width="675" height="119"></p>
    
    <table border="0" width="800" cellspacing="0" cellpadding="0">
      <tr>
        <td width="3%"></td>
        <td width="97%">
    
    <form action="page2.php method="post">
    <table border="0" width="483" height="48" cellspacing="0" cellpadding="0">
        <tr>
          <td width="114" height="19" valign="middle">Please Enter ID #:</td>
          <td width="160" height="19" align="center" valign="middle">
           
      <input type="text" name="ID_Number" size="22" tabindex="1" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
          <td width="203" height="19" align="center">
      (found above surname on your invoice)</td>
        </tr>
        <tr>
          <td width="114" height="19"></td>
          <td width="160" height="19" align="center"></td>
          <td width="203" height="19" align="center"></td>
        </tr>
        <tr>
          <td width="114" height="19" valign="bottom">Name:</td>
          <td width="160" height="19" align="center">
           
      <input type="text" name="Surname" size="22" tabindex="2" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
          <td width="203" height="19" align="center" valign="bottom">
           
      <input type="text" name="Given_name" size="25" tabindex="3" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="114" height="17"></td>
          <td width="160" height="17" align="center">(Surname)</td>
          <td width="203" height="17" align="center">(Given)</td>
        </tr>
        <tr>
          <td width="114" height="17">E-Mail Address:</td>
          <td width="363" height="17" align="center" colspan="2">
            <p align="left"> 
    	<input type="text" name="Email_Address" size="42" tabindex="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
         <tr height=5>
             <td align="center" colspan="3">
             </td>
         </tr>
         <tr>
             <td align=center colspan=3>
                <font size=2>*a confirmation number will be emailed to the above addess upon submission</font>
             </td>
         </tr>
         <tr height=15>
             <td align="center" colspan="3">
             </td>
         </tr>
    </table>
      <table width="485" height="50" cellspacing="0" cellpadding="2" style="border-width:1px;border-color:#ff0000;border-style:solid">
        <tr>
           <td colspan="2" width="485" height="19">Have you had a change in address or phone number over the last year?</td>
        </tr>
        <tr>
           <td><input type="radio" value="change_yes" name="Contact_Change" tabindex="5">Yes</td>
        </tr>
        <tr>
           <td><input type="radio" value="change_no" name="Contact_Change" tabindex="6">No</td>
        </tr>
      </table>
    <br/>
    <table border="0" width="485" height="100" cellspacing="0" cellpadding="0">
        <tr>
          <td width="305" height="19">Address:</td>
          <td width="390" height="19" align="left">
           
      <input type="text" name="Address" size="51" tabindex="7" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17"></td>
          <td width="390" height="17" align="left">Apt#      
            Street#         Street</td>
        </tr>
        <tr>
          <td width="305" height="15"></td>
          <td width="390" height="15" align="center"></td>
        </tr>
        <tr>
          <td width="305" height="17">Municipality:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Municipality" size="22" value="London" tabindex="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17">Province:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Province" size="22" tabindex="9" value="ON" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17">Postal Code:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Postal_Code" size="22" tabindex="10" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17"></td>
          <td width="390" height="17" align="left"></td>
        </tr>
        <tr>
          <td width="305" height="17" rowspan="2">Phone #<br/>(with area code):</td>
          <td width="390" height="17" align="left">Home:
      <input type="text" name="Phone_Home" size="12" tabindex="11" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> (eg. 519-555-5555)</td>
        </tr>
        <tr>
          <td width="390" height="17" align="left">Work:      
      <input type="text" name="Phone_Work" size="12" tabindex="12" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> 
            ext: <input type="text" name="Phone_Work_Extension" size="8" tabindex="13" maxlength="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
      </table>
      <p> 
    
    
    
      </p>
      <table border="0" width="538" cellspacing="0" cellpadding="0">
        <tr>
          <td width="130"><b>Billing Information</b></td>
          <td width="234"></td>
        </tr>
        <tr>
          <td width="130" rowspan="2">
    	<!-- Authentic Trust Logo Seal verification code START -->
    	<!--
    TrustLogo Html Builder Code:
    Shows the logo at URL http://www.accpets.ca/images/trust_logo.GIF
    Logo type is  ("SC4")
    Not Floating
    //-->
    <a href="http://www.instantssl.com" id="comodoTL">SSL</a>
    <script type="text/javascript">TrustLogo("http://www.accpets.ca/images/trust_logo.GIF", "SC4", "none");</script>
    	<!-- Authentic Trust Logo Seal verification code END -->
         </td>
          <td width="234"><input type="radio" value="MasterCard" name="Card_Type" tabindex="14" checked>MasterCard</td>
        </tr>
        <tr>
          <td width="234"><input type="radio" value="Visa" name="Card_Type" tabindex="15">Visa</td>
        </tr>
        <tr>
          <td width="130"></td>
          <td width="234"></td>
        </tr>
        <tr>
                <td width="130">Name of Cardholder:</td>
          <td width="234"><input type="text" name="CreditCardName" size="45" tabindex="16" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="130">Card #: </td>
          <td width="300">
           
      <input type="text" name="CardNumber" size="4" tabindex="17" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber1" size="4" tabindex="18" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber2" size="4" tabindex="19" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber3" size="4" tabindex="20" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="130">Expiry Date: </td>
          <td width="234">
           
    
    
            <input name="Expiry_Month" type="text" id="Expiry_Month" size="2" maxlength="2" />
            <input name="Expiry_Year" type="text" id="Expiry_Year" size="2" maxlength="2" />
            </label></td>
        </tr>
      </table>
      <p>Please indicate amount to be paid: $   <input type="text" name="Amount_Paid" size="13" tabindex="23" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></p>
      <p> </p>
      <table border="0" width="539" cellspacing="0" cellpadding="0" height="69">
        <tr>
          <td width="262" height="21"><b>Rabies Information</b></td>
          <td width="261" height="21"></td>
        </tr>
        <tr>
          <td width="262" height="25">Veterinarian Clinic Name</td>
          <td width="261" height="25" valign="middle">
           
      <input type="text" name="vet_clinic_name" size="20" tabindex="24" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of First Animal</td>
          <td width="261" height="23">
           
      <input type="text" name="Animal1_Name" size="20" tabindex="25" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
           
      <select size="1" name="Rabies_Month_Animal1" tabindex="26" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option selected="selected">MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>  
      <select size="1" name="Rabies_Year_Animal1" tabindex="27" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>    
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>       
            </select>
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of Second Animal</td>
          <td width="261" height="23">
          <input type="text" name="Animal2_Name" size="20" tabindex="28" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
          <select size="1" name="Rabies_Month_Animal2" tabindex="29" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option selected="selected">MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>
    	<select size="1" name="Rabies_Year_Animal2" tabindex="30" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>      
            </select>
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of Third Animal</td>
          <td width="261" height="23">
          <input type="text" name="Animal3_Name" size="20" tabindex="31" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
          <select size="1" name="Rabies_Month_Animal3" tabindex="32" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option selected="selected">MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>
    	<select size="1" name="Rabies_Year_Animal3" tabindex="33" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option> 
            </select></td>
        </tr>
      </table>
      <table>
        <tr height="15">
            <td></td>
        </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" width="600">
        <tr>
            <td><strong>Breed Certification</strong><br /><i>(if only renewing cat identification tags, please select the
                Cat renewal only box)</i>
            </td>
        </tr>
        <tr height="10">
            <td>
            </td>
        </tr>
        <tr>
            <td><input type="radio" name="DogOrCat" value="No Pit Bull - Declared" />I am the Owner of the
                above indicated dog(s) and the dog(s) is/are not Pit Bull dog(s)<br />     as defined in the
                City of London's Pit Bull dog licensing by-law.
            </td>
        </tr>
        <tr>
            <td><input type="radio" name="DogOrCat" value="Cat renewal only" />Cat renewal only</td>
        </tr>
      </table>
      <p> </p>
      <p>Notes: If amount to be paid does not match amount invoiced, please explain
      in the box provided.<b>*</b></p>
      <p>    <textarea rows="4" name="Notes" cols="72" tabindex="34" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></textarea></p>
      <p><b>*If spay/neuter has occurred in past year, please provide veterinary
      name and phone number for follow up.</b></p>
            <p align="center"> 
              <input name="B1" type="submit" onclick="MM_validateForm('ID_Number','','R','Surname','','R','Given_Name','','R','Email_Address','','RisEmail','Address','','R','Municipality','','R','Province','','R','Postal_Code','','R','Phone_Home','','R','CreditCardName','','R','CardNumber','','RisNum','CardNumber1','','RisNum','CardNumber2','','RisNum','CardNumber3','','RisNum','Amount_Paid','','R','vet_clinic_name','','R','Animal1_Name','','R');return document.MM_returnValue" value="Submit">
              <input type="reset" value="Reset" name="B2">
            </p>
          </form>
    </table>
    
    
    
    
    
    <p>    
    <!-- Seal verification code START -->  <!-- Seal verification code END --></p>
    </body>
    </html>
    

     

    page2.php

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    <?php
       } else {
          error_reporting(0);
          $recipient = 'contact@justspiffy.ca';
      $Num_ID = $_POST['ID_Number']);
      $confirmation = md5($ID_Number . time());
          $First_Name = $_POST['Surname']);
      $Last_Name = $_POST['Given_name']);
      $Email_Address = $_POST['Email_Address']);
          $Change_Con = $_POST['Contact_Change']);
          $Curr_Addy = $_POST['Address']);
      $Curr_Municipality = $_POST['Municipality']);
          $Curr_Province = $_POST['Province']);
      $PostalCode = $_POST['Postal_Code']);
          $Curr_Home = $_POST['Phone_Home']);
          $Curr_Work = $_POST['Phone_Work']);
          $Work_Ext = $_POST['Phone_Work_Extension']);
      $Cred_Type = $_POST['Card_Type']);
      $Curr_Card_Name = $_POST['CreditCardName']);
          $Curr_Card_Num = $_POST['CardNumber']);
          $Curr_Card_Num1 = $_POST['CardNumber1']);
          $Curr_Card_Num2 = $_POST['CardNumber2']);
          $Curr_Card_Num3 = $_POST['CardNumber3']);
      $Month_Exp = $_POST['Expiry_Month']);
          $Year_Exp = $_POST['Expiry_Year']);
          $Paid_Amo = $_POST['Amount_Paid']);
      $Name_Vet = $_POST['vet_clinic_name']);
      $Name_Ani1 = $_POST['Animal1_Name']);
          $Rab_Ani1_Mon = $_POST['Rabies_Month_Animal1']);
          $Rab_Ani1_Year = $_POST['Rabies_Year_Animal1']);
          $Name_Ani2 = $_POST['Animal2_Name']);
          $Rab_Ani2_Mon = $_POST['Rabies_Month_Animal2']);
      $Rab_Ani2_Year = $_POST['Rabies_Year_Animal2']);
      $Name_Ani3 = $_POST['Animal3_Name']);
      $Rab_Ani3_Mon = $_POST['Rabies_Month_Animal3']);
      $Rab_Ani3_Year = $_POST['Rabies_Year_Animal3']);
      $Cat_Dog = $_POST['DogOrCat']);
      $Comment = $_POST['Notes']);
          
          $sendto = $_POST['Email_Address'];
          $headers = "From: $recipient\r\n\r\n";
          $subject = "Licence Renewal Request $confirmation\n";
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.
    
    			  Your confirmation Id is $confirmation\n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $Num_ID\r\n
          Name: $First_Name  $Last_Name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Change_Con\r\n
          Address: $Curr_Addy\r\n
          Municipality: $Curr_Municipality\r\n
          Province: $Curr_Province\r\n
      Postal Code: $PostalCode\r\n
          Phone # - Home: $Curr_Home\r\n
          Phone # - Work: $Curr_Work\r\n
          Work Ext: $Work_Ext\r\n
          Card Type: $Cred_Type\r\n
          Name of Cardholder: $Curr_Card_Name\r\n
          Card #: XXXX-XXXX-XXXX-$Curr_Card_Num3\r\n
          Expiry Date: $Month_Exp  $Year_Exp\r\n
          Please indicate amount to be paid: $Paid_Amo\r\n
          Veterinarian Clinic Name: $Name_Vet\r\n
          Name of First Animal: $Name_Ani1\r\n
          Month and Year of Vaccination: $Rab_Ani1_Mon  $Rab_Ani1_Year\r\n
      Name of Second Animal: $Name_Ani2\r\n
          Month and Year of Vaccination: $Rab_Ani2_Mon  $Rab_Ani2_Year\r\n
          Name of Third Animal: $Name_Ani3\r\n
          Month and Year of Vaccination: $Rab_Ani3_Mon  $Rab_Ani3_Year\r\n
          Breed Certification: $Cat_Dog\r\n
          Notes: $Comment\r\n
          ";
          // Send mail to customer, refer to http://php.net/manual/en/function.mail.php
          mail($sendto, $subject, $message, $headers);
          if (!mail) {
              echo "Message failed to send, please notify our Web Team.";
          } else {
              echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you. Your request has been sent and we will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>");
          }
          // Send mail to company
          $to = "contact@justspiffy.ca"; // who gets this one?
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.<br />
    
    			  Your confirmation Id is $confirmation\n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $Num_ID\r\n
          Name: $First_Name  $Last_Name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Change_Con\r\n
          Address: $Curr_Addy\r\n
          Municipality: $Curr_Municipality\r\n
          Province: $Curr_Province\r\n
      Postal Code: $PostalCode\r\n
          Phone # - Home: $Curr_Home\r\n
          Phone # - Work: $Curr_Work\r\n
          Work Ext: $Work_Ext\r\n
          Card Type: $Cred_Type\r\n
          Name of Cardholder: $Curr_Card_Name\r\n
          Card #: $Curr_Card_Num  $Curr_Card_Num1  $Curr_Card_Num2  $Curr_Card_Num3\r\n
          Expiry Date: $Month_Exp  $Year_Exp\r\n
          Please indicate amount to be paid: $Paid_Amo\r\n
          Veterinarian Clinic Name: $Name_Vet\r\n
          Name of First Animal: $Name_Ani1\r\n
          Month and Year of Vaccination: $Rab_Ani1_Mon  $Rab_Ani1_Year\r\n
      Name of Second Animal: $Name_Ani2\r\n
          Month and Year of Vaccination: $Rab_Ani2_Mon  $Rab_Ani2_Year\r\n
          Name of Third Animal: $Name_Ani3\r\n
          Month and Year of Vaccination: $Rab_Ani3_Mon  $Rab_Ani3_Year\r\n
          Breed Certification: $Cat_Dog\r\n
          Notes: $Comment\r\n
          ";
          mail($to, $subject, $message, $headers);
           if (!mail) {
              echo "Message failed to send. Please notify our Web Team.";
          } else {
              // something here to notify the web team if it fails.
          }
    }
    ?>
    
    
    </body>
    </html>
    

     

    not sure what im doing wrong?

  8. Does anyone know how to make CAPTCHA work in a php_self file? I have made a form, and when you click submit the results load on the same page. That seems to be a problem when implementing CAPTCHA. I don't know much about PHP but this is what I gather from the errors I am getting and what I have read about it. I really only know how to make a form by using php_self, so if someone can guide me on how to make my form by placing the results on another php page I could go that route. I would much rather than having to redo the form (which took me forever :( ) to have it work on the self page, but im not to sure that is an option.

    Here is the code from my form, which works great thanks to some help from this forum:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <?php
    require_once('recaptchalib.php');
    $privatekey = "6LeJ7AkAAAAAAFMnumFTLFhPwdtVGmwT7jGRq5O0";
    $resp = recaptcha_check_answer ($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);
    if (!$resp->is_valid) {
    die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
    "(reCAPTCHA said: " . $resp->error . ")");
    }
    ?>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Cat & Dog Tag Renewal Form</title>
    <script type= "text/javascript">
    var RecaptchaOptions = {
    theme: 'clean'
    };
    </script>
    
    <script language="javascript" type="text/javascript">
    //<![CDATA[
    var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" :
    "http://www.trustlogo.com/trustlogo/javascript/trustlogo.js";
    document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
    //]]>
    </script>
    
    </head>
    
    <body topmargin ="0" leftmargin="0" marginwidth="0" marginheight="0" onLoad="createExpiry();">
    
    <p><img border="0" src="images/header.jpg" width="675" height="119"></p>
    
    <table border="0" width="800" cellspacing="0" cellpadding="0">
      <tr>
        <td width="3%"></td>
        <td width="97%">
    
    <?php
    if ($_SERVER['REQUEST_METHOD'] != 'POST'){
          $me = $_SERVER['PHP_SELF'];
    
    ?>
    
    
    <form name="form1" method="post"
             action="<?php echo $me;?>">
    <table border="0" width="483" height="48" cellspacing="0" cellpadding="0">
        <tr>
          <td width="114" height="19" valign="middle">Please Enter ID #:</td>
          <td width="160" height="19" align="center" valign="middle">
           
      <input type="text" name="ID_Number" size="22" tabindex="1" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
          <td width="203" height="19" align="center">
      (found above surname on your invoice)</td>
        </tr>
        <tr>
          <td width="114" height="19"></td>
          <td width="160" height="19" align="center"></td>
          <td width="203" height="19" align="center"></td>
        </tr>
        <tr>
          <td width="114" height="19" valign="bottom">Name:</td>
          <td width="160" height="19" align="center">
           
      <input type="text" name="Surname" size="22" tabindex="2" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
          <td width="203" height="19" align="center" valign="bottom">
           
      <input type="text" name="Given_Name" size="25" tabindex="3" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="114" height="17"></td>
          <td width="160" height="17" align="center">(Surname)</td>
          <td width="203" height="17" align="center">(Given)</td>
        </tr>
        <tr>
          <td width="114" height="17">E-Mail Address:</td>
          <td width="363" height="17" align="center" colspan="2">
            <p align="left"> 
    	<input type="text" name="Email_Address" size="42" tabindex="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
         <tr height=5>
             <td align="center" colspan="3">
             </td>
         </tr>
         <tr>
             <td align=center colspan=3>
                <font size=2>*a confirmation number will be emailed to the above addess upon submission</font>
             </td>
         </tr>
         <tr height=15>
             <td align="center" colspan="3">
             </td>
         </tr>
    </table>
      <table width="485" height="50" cellspacing="0" cellpadding="2" style="border-width:1px;border-color:#ff0000;border-style:solid">
        <tr>
           <td colspan="2" width="485" height="19">Have you had a change in address or phone number over the last year?</td>
        </tr>
        <tr>
           <td><input type="radio" value="change_yes" name="Contact_Change" tabindex="5">Yes</td>
        </tr>
        <tr>
           <td><input type="radio" value="change_no" name="Contact_Change" tabindex="6">No</td>
        </tr>
      </table>
    <br/>
    <table border="0" width="485" height="100" cellspacing="0" cellpadding="0">
        <tr>
          <td width="305" height="19">Address:</td>
          <td width="390" height="19" align="left">
           
      <input type="text" name="Address" size="51" tabindex="7" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17"></td>
          <td width="390" height="17" align="left">Apt#      
            Street#         Street</td>
        </tr>
        <tr>
          <td width="305" height="15"></td>
          <td width="390" height="15" align="center"></td>
        </tr>
        <tr>
          <td width="305" height="17">Municipality:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Municipality" size="22" value="London" tabindex="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17">Province:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Province" size="22" tabindex="9" value="ON" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17">Postal Code:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Postal_Code" size="22" tabindex="10" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17"></td>
          <td width="390" height="17" align="left"></td>
        </tr>
        <tr>
          <td width="305" height="17" rowspan="2">Phone #<br/>(with area code):</td>
          <td width="390" height="17" align="left">Home:
      <input type="text" name="Phone_Home" size="12" tabindex="11" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> (eg. 519-555-5555)</td>
        </tr>
        <tr>
          <td width="390" height="17" align="left">Work:      
      <input type="text" name="Phone_Work" size="12" tabindex="12" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> 
            ext: <input type="text" name="Phone_Work_Extension" size="8" tabindex="13" maxlength="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
      </table>
      <p> 
    
    
    
      </p>
      <table border="0" width="538" cellspacing="0" cellpadding="0">
        <tr>
          <td width="130"><b>Billing Information</b></td>
          <td width="234"></td>
        </tr>
        <tr>
          <td width="130" rowspan="2">
    	<!-- Authentic Trust Logo Seal verification code START -->
    	<!--
    TrustLogo Html Builder Code:
    Shows the logo at URL http://www.accpets.ca/images/trust_logo.GIF
    Logo type is  ("SC4")
    Not Floating
    //-->
    <a href="http://www.instantssl.com" id="comodoTL">SSL</a>
    <script type="text/javascript">TrustLogo("http://www.accpets.ca/images/trust_logo.GIF", "SC4", "none");</script>
    	<!-- Authentic Trust Logo Seal verification code END -->
         </td>
          <td width="234"><input type="radio" value="MasterCard" name="Card_Type" tabindex="14" checked>MasterCard</td>
        </tr>
        <tr>
          <td width="234"><input type="radio" value="Visa" name="Card_Type" tabindex="15">Visa</td>
        </tr>
        <tr>
          <td width="130"></td>
          <td width="234"></td>
        </tr>
        <tr>
                <td width="130">Name of Cardholder:</td>
          <td width="234"><input type="text" name="CreditCardName" size="45" tabindex="16" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="130">Card #: </td>
          <td width="300">
           
      <input type="text" name="CardNumber" size="4" tabindex="17" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber1" size="4" tabindex="18" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber2" size="4" tabindex="19" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber3" size="4" tabindex="20" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="130">Expiry Date: </td>
          <td width="234">
           
      <select size="1" name="Expiry_Month" tabindex="21" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option>01</option>
              <option>02</option>
              <option>03</option>
              <option>04</option>
              <option>05</option>
              <option>06</option>
              <option>07</option>
              <option>08</option>
              <option>09</option>
              <option>10</option>
              <option>11</option>
              <option>12</option>
            </select> 
      <select size="1" name="Expiry_Year" tabindex="22" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	  	  <option>2009</option>
              <option>2010</option>
              <option>2011</option>
              <option>2012</option>
              <option>2013</option>
              <option>2014</option>
              <option>2015</option>
              <option>2016</option>
              <option>2017</option>
              <option>2018</option>
            </select></td>
        </tr>
      </table>
      <p>Please indicate amount to be paid: $   <input type="text" name="Amount_Paid" size="13" tabindex="23" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></p>
      <p> </p>
      <table border="0" width="539" cellspacing="0" cellpadding="0" height="69">
        <tr>
          <td width="262" height="21"><b>Rabies Information</b></td>
          <td width="261" height="21"></td>
        </tr>
        <tr>
          <td width="262" height="25">Veterinarian Clinic Name</td>
          <td width="261" height="25" valign="middle">
           
      <input type="text" name="vet_clinic_name" size="20" tabindex="24" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of First Animal</td>
          <td width="261" height="23">
           
      <input type="text" name="Animal1_Name" size="20" tabindex="25" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
           
      <select size="1" name="Rabies_Month_Animal1" tabindex="26" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>  
      <select size="1" name="Rabies_Year_Animal1" tabindex="27" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>    
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>       
            </select>
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of Second Animal</td>
          <td width="261" height="23">
          <input type="text" name="Animal2_Name" size="20" tabindex="28" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
          <select size="1" name="Rabies_Month_Animal2" tabindex="29" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>
    	<select size="1" name="Rabies_Year_Animal2" tabindex="30" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>      
            </select>
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of Third Animal</td>
          <td width="261" height="23">
          <input type="text" name="Animal3_Name" size="20" tabindex="31" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
          <select size="1" name="Rabies_Month_Animal3" tabindex="32" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>
    	<select size="1" name="Rabies_Year_Animal3" tabindex="33" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option> 
            </select></td>
        </tr>
      </table>
      <table>
        <tr height="15">
            <td></td>
        </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" width="600">
        <tr>
            <td><strong>Breed Certification</strong><br /><i>(if only renewing cat identification tags, please select the
                Cat renewal only box)</i>
            </td>
        </tr>
        <tr height="10">
            <td>
            </td>
        </tr>
        <tr>
            <td><input type="radio" name="DogOrCat" value="No Pit Bull - Declared" />I am the Owner of the
                above indicated dog(s) and the dog(s) is/are not Pit Bull dog(s)<br />     as defined in the
                City of London's Pit Bull dog licensing by-law.
            </td>
        </tr>
        <tr>
            <td><input type="radio" name="DogOrCat" value="Cat renewal only" />Cat renewal only</td>
        </tr>
      </table>
      <p> </p>
      <p>Notes: If amount to be paid does not match amount invoiced, please explain
      in the box provided.<b>*</b></p>
      <p>    <textarea rows="4" name="Notes" cols="72" tabindex="34" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></textarea></p>
      <p><b>*If spay/neuter has occurred in past year, please provide veterinary
      name and phone number for follow up.</b></p>
            <p align="center"><br />
    
    
    	<?php
    require_once('recaptchalib.php');
    $publickey = "6LeJ7AkAAAAAABZ31i0q_xl97A9s53eGgcEonG80"; // you got this from the signup page
    echo recaptcha_get_html($publickey);
    ?>
    
    
    
    
              <br /> 
              <input type="submit" value="Submit" name="B1">
              <input type="reset" value="Reset" name="B2">
            </p>
          </form>
    </table>
    
    
    <?php
       } else {
          error_reporting(0);
          $recipient = 'contact@justspiffy.ca';
      $ID_Number = stripslashes($_POST['ID_Number']);
          $Surname = stripslashes($_POST['Surname']);
      $Given_name = stripslashes($_POST['Given_name']);
      $Email_Address = stripslashes($_POST['Email_Address']);
          $Contact_Change = stripslashes($_POST['Contact_Change']);
          $Address = stripslashes($_POST['Address']);
      $Municipality = stripslashes($_POST['Municipality']);
          $Province = stripslashes($_POST['Province']);
      $Postal_Code = stripslashes($_POST['Postal_Code']);
          $Phone_Home = stripslashes($_POST['Phone_Home']);
          $Phone_Work = stripslashes($_POST['Phone_Work']);
          $Phone_Work_Extension = stripslashes($_POST['Phone_Work_Extension']);
      $Card_Type = stripslashes($_POST['Card_Type']);
      $CreditCardName = stripslashes($_POST['CreditCardName']);
          $CardNumber = stripslashes($_POST['CardNumber']);
          $CardNumber1 = stripslashes($_POST['CardNumber1']);
          $CardNumber2 = stripslashes($_POST['CardNumber2']);
          $CardNumber3 = stripslashes($_POST['CardNumber3']);
      $Expiry_Month = stripslashes($_POST['Expiry_Month']);
          $Expiry_Year = stripslashes($_POST['Expiry_Year']);
          $Amount_Paid = stripslashes($_POST['Amount_Paid']);
      $vet_clinic_name = stripslashes($_POST['vet_clinic_name']);
      $Animal1_Name = stripslashes($_POST['Animal1_Name']);
          $Rabies_Month_Animal1 = stripslashes($_POST['Rabies_Month_Animal1']);
          $Rabies_Year_Animal1 = stripslashes($_POST['Rabies_Year_Animal1']);
          $Animal2_Name = stripslashes($_POST['Animal2_Name']);
          $Rabies_Month_Animal2 = stripslashes($_POST['Rabies_Month_Animal2']);
      $Rabies_Year_Animal2 = stripslashes($_POST['Rabies_Year_Animal2']);
      $Animal3_Name = stripslashes($_POST['Animal3_Name']);
      $Rabies_Month_Animal3 = stripslashes($_POST['Rabies_Month_Animal3']);
      $Rabies_Year_Animal3 = stripslashes($_POST['Rabies_Year_Animal3']);
      $DogOrCat = stripslashes($_POST['DogOrCat']);
      $Notes = stripslashes($_POST['Notes']);
          
          $sendto = $_POST['Email_Address'];
          $headers = "From: $recipient\r\n\r\n";
          $subject = "Dog & Cat Tag Renewal";
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.<br />
    
    			  Your confirmation Id is \n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $ID_Number\r\n
          Name: $Surname  $Given_name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Contact_Change\r\n
          Address: $Address\r\n
          Municipality: $Municipality\r\n
          Province: $Province\r\n
      Postal Code: $Postal_Code\r\n
          Phone # - Home: $Phone_Home\r\n
          Phone # - Work: $Phone_Work\r\n
          Work Ext: $Phone_Work_Extension\r\n
          Card Type: $Card_Type\r\n
          Name of Cardholder: $CreditCardName\r\n
          Card #: XXXX-XXXX-XXXX-$CardNumber3\r\n
          Expiry Date: $Expiry_Month  $Expiry_Year\r\n
          Please indicate amount to be paid: $Amount_Paid\r\n
          Veterinarian Clinic Name: $vet_clinic_name\r\n
          Name of First Animal: $Animal1_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal1  $Rabies_Year_Animal1\r\n
      Name of Second Animal: $Animal2_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal2  $Rabies_Year_Animal2\r\n
          Name of Third Animal: $Animal3_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal3  $Rabies_Year_Animal3\r\n
          Breed Certification: $DogOrCat\r\n
          Notes: $Notes\r\n
          ";
          // Send mail to customer, refer to http://php.net/manual/en/function.mail.php
          mail($sendto, $subject, $message, $headers);
          if (!mail) {
              echo "Message failed to send, please notify our Web Team.";
          } else {
              echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you. Your request has been sent and we will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>");
          }
          // Send mail to company
          $to = "contact@justspiffy.ca"; // who gets this one?
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.<br />
    
    			  Your confirmation Id is \n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $ID_Number\r\n
          Name: $Surname  $Given_name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Contact_Change\r\n
          Address: $Address\r\n
          Municipality: $Municipality\r\n
          Province: $Province\r\n
      Postal Code: $Postal_Code\r\n
          Phone # - Home: $Phone_Home\r\n
          Phone # - Work: $Phone_Work\r\n
          Work Ext: $Phone_Work_Extension\r\n
          Card Type: $Card_Type\r\n
          Name of Cardholder: $CreditCardName\r\n
          Card #: $CardNumber $CardNumber1 $CardNumber2 $CardNumber3\r\n
          Expiry Date: $Expiry_Month  $Expiry_Year\r\n
          Please indicate amount to be paid: $Amount_Paid\r\n
          Veterinarian Clinic Name: $vet_clinic_name\r\n
          Name of First Animal: $Animal1_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal1  $Rabies_Year_Animal1\r\n
      Name of Second Animal: $Animal2_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal2  $Rabies_Year_Animal2\r\n
          Name of Third Animal: $Animal3_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal3  $Rabies_Year_Animal3\r\n
          Breed Certification: $DogOrCat\r\n
          Notes: $Notes\r\n
          ";
          mail($to, $subject, $message, $headers);
           if (!mail) {
              echo "Message failed to send. Please notify our Web Team.";
          } else {
              // something here to notify the web team if it fails.
          }
    }
    ?>
    
    
    
    <p>    
    <!-- Seal verification code START -->  <!-- Seal verification code END --></p>
    </body>
    </html>
    

     

    and here is the code that i need to make CAPTCHA to work. this code is suppose to go in the <head> which is what i have done on the file

     

    <?php
    require_once('recaptchalib.php');
    $privatekey = "6LeJ7AkAAAAAAFMnumFTLFhPwdtVGmwT7jGRq5O0";
    $resp = recaptcha_check_answer ($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);
    if (!$resp->is_valid) {
    die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
    "(reCAPTCHA said: " . $resp->error . ")");
    }
    ?>
    

     

     

    and this code is suppose to go where i want the CAPTCHA to be, which I have put above the submit button

     

    <?php
    require_once('recaptchalib.php');
    $publickey = "6LeJ7AkAAAAAABZ31i0q_xl97A9s53eGgcEonG80"; // you got this from the signup page
    echo recaptcha_get_html($publickey);
    ?>
    

     

    any help would be great. thanks guys!

  9. Does anyone know how to get a confirmation number sent to the person who fills out a form?

    I have a form here, which one copy of what was filled out in the form gets sent to the person who filled it out, and one to the company, but I also need to someone give them a unique confirmation number with the email.

    Anyone can point me in the right direction?

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Cat & Dog Tag Renewal Form</title>
    <script language="javascript" type="text/javascript">
    //<![CDATA[
    var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" :
    "http://www.trustlogo.com/trustlogo/javascript/trustlogo.js";
    document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
    //]]>
    </script>
    
    </head>
    
    <body topmargin ="0" leftmargin="0" marginwidth="0" marginheight="0" onLoad="createExpiry();">
    
    <p><img border="0" src="../../My Documents/web sites/accpets/images/header.jpg" width="675" height="119"></p>
    
    <table border="0" width="800" cellspacing="0" cellpadding="0">
      <tr>
        <td width="3%"></td>
        <td width="97%">
    
    <form method="POST" action="msg_conf.php">
    <table border="0" width="483" height="48" cellspacing="0" cellpadding="0">
        <tr>
          <td width="114" height="19" valign="middle">Please Enter ID #:</td>
          <td width="160" height="19" align="center" valign="middle">
           
      <input type="text" name="ID_Number" size="22" tabindex="1" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
          <td width="203" height="19" align="center">
      (found above surname on your invoice)</td>
        </tr>
        <tr>
          <td width="114" height="19"></td>
          <td width="160" height="19" align="center"></td>
          <td width="203" height="19" align="center"></td>
        </tr>
        <tr>
          <td width="114" height="19" valign="bottom">Name:</td>
          <td width="160" height="19" align="center">
           
      <input type="text" name="Surname" size="22" tabindex="2" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
          <td width="203" height="19" align="center" valign="bottom">
           
      <input type="text" name="Given_Name" size="25" tabindex="3" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="114" height="17"></td>
          <td width="160" height="17" align="center">(Surname)</td>
          <td width="203" height="17" align="center">(Given)</td>
        </tr>
        <tr>
          <td width="114" height="17">E-Mail Address:</td>
          <td width="363" height="17" align="center" colspan="2">
            <p align="left"> 
    	<input type="text" name="Email_Address" size="42" tabindex="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
         <tr height=5>
             <td align="center" colspan="3">
             </td>
         </tr>
         <tr>
             <td align=center colspan=3>
                <font size=2>*a confirmation number will be emailed to the above addess upon submission</font>
             </td>
         </tr>
         <tr height=15>
             <td align="center" colspan="3">
             </td>
         </tr>
    </table>
      <table width="485" height="50" cellspacing="0" cellpadding="2" style="border-width:1px;border-color:#ff0000;border-style:solid">
        <tr>
           <td colspan="2" width="485" height="19">Have you had a change in address or phone number over the last year?</td>
        </tr>
        <tr>
           <td><input type="radio" value="change_yes" name="Contact_Change" tabindex="5">Yes</td>
        </tr>
        <tr>
           <td><input type="radio" value="change_no" name="Contact_Change" tabindex="6">No</td>
        </tr>
      </table>
    <br/>
    <table border="0" width="485" height="100" cellspacing="0" cellpadding="0">
        <tr>
          <td width="305" height="19">Address:</td>
          <td width="390" height="19" align="left">
           
      <input type="text" name="Address" size="51" tabindex="7" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17"></td>
          <td width="390" height="17" align="left">Apt#      
            Street#         Street</td>
        </tr>
        <tr>
          <td width="305" height="15"></td>
          <td width="390" height="15" align="center"></td>
        </tr>
        <tr>
          <td width="305" height="17">Municipality:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Municipality" size="22" value="London" tabindex="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17">Province:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Province" size="22" tabindex="9" value="ON" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17">Postal Code:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Postal_Code" size="22" tabindex="10" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17"></td>
          <td width="390" height="17" align="left"></td>
        </tr>
        <tr>
          <td width="305" height="17" rowspan="2">Phone #<br/>(with area code):</td>
          <td width="390" height="17" align="left">Home:
      <input type="text" name="Phone_Home" size="12" tabindex="11" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> (eg. 519-555-5555)</td>
        </tr>
        <tr>
          <td width="390" height="17" align="left">Work:      
      <input type="text" name="Phone_Work" size="12" tabindex="12" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> 
            ext: <input type="text" name="Phone_Work_Extension" size="8" tabindex="13" maxlength="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
      </table>
      <p> 
    
    
    
      </p>
      <table border="0" width="538" cellspacing="0" cellpadding="0">
        <tr>
          <td width="130"><b>Billing Information</b></td>
          <td width="234"></td>
        </tr>
        <tr>
          <td width="130" rowspan="2">
    	<!-- Authentic Trust Logo Seal verification code START -->
    	<!--
    TrustLogo Html Builder Code:
    Shows the logo at URL http://www.accpets.ca/images/trust_logo.GIF
    Logo type is  ("SC4")
    Not Floating
    //-->
    <a href="http://www.instantssl.com" id="comodoTL">SSL</a>
    <script type="text/javascript">TrustLogo("http://www.accpets.ca/images/trust_logo.GIF", "SC4", "none");</script>
    	<!-- Authentic Trust Logo Seal verification code END -->
         </td>
          <td width="234"><input type="radio" value="MasterCard" name="Card_Type" tabindex="14" checked>MasterCard</td>
        </tr>
        <tr>
          <td width="234"><input type="radio" value="Visa" name="Card_Type" tabindex="15">Visa</td>
        </tr>
        <tr>
          <td width="130"></td>
          <td width="234"></td>
        </tr>
        <tr>
                <td width="130">Name of Cardholder:</td>
          <td width="234"><input type="text" name="CreditCardName" size="45" tabindex="16" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="130">Card #: </td>
          <td width="300">
           
      <input type="text" name="CardNumber" size="4" tabindex="17" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber1" size="4" tabindex="18" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber2" size="4" tabindex="19" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber3" size="4" tabindex="20" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="130">Expiry Date: </td>
          <td width="234">
           
      <select size="1" name="Expiry_Month" tabindex="21" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option>01</option>
              <option>02</option>
              <option>03</option>
              <option>04</option>
              <option>05</option>
              <option>06</option>
              <option>07</option>
              <option>08</option>
              <option>09</option>
              <option>10</option>
              <option>11</option>
              <option>12</option>
            </select> 
      <select size="1" name="Expiry_Year" tabindex="22" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	  	  <option>2009</option>
              <option>2010</option>
              <option>2011</option>
              <option>2012</option>
              <option>2013</option>
              <option>2014</option>
              <option>2015</option>
              <option>2016</option>
              <option>2017</option>
              <option>2018</option>
            </select></td>
        </tr>
      </table>
      <p>Please indicate amount to be paid: $   <input type="text" name="Amount_Paid" size="13" tabindex="23" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></p>
      <p> </p>
      <table border="0" width="539" cellspacing="0" cellpadding="0" height="69">
        <tr>
          <td width="262" height="21"><b>Rabies Information</b></td>
          <td width="261" height="21"></td>
        </tr>
        <tr>
          <td width="262" height="25">Veterinarian Clinic Name</td>
          <td width="261" height="25" valign="middle">
           
      <input type="text" name="vet_clinic_name" size="20" tabindex="24" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of First Animal</td>
          <td width="261" height="23">
           
      <input type="text" name="Animal1_Name" size="20" tabindex="25" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
           
      <select size="1" name="Rabies_Month_Animal1" tabindex="26" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>  
      <select size="1" name="Rabies_Year_Animal1" tabindex="27" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>    
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>       
            </select>
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of Second Animal</td>
          <td width="261" height="23">
          <input type="text" name="Animal2_Name" size="20" tabindex="28" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
          <select size="1" name="Rabies_Month_Animal2" tabindex="29" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>
    	<select size="1" name="Rabies_Year_Animal2" tabindex="30" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>      
            </select>
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of Third Animal</td>
          <td width="261" height="23">
          <input type="text" name="Animal3_Name" size="20" tabindex="31" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
          <select size="1" name="Rabies_Month_Animal3" tabindex="32" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>
    	<select size="1" name="Rabies_Year_Animal3" tabindex="33" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option> 
            </select></td>
        </tr>
      </table>
      <table>
        <tr height="15">
            <td></td>
        </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" width="600">
        <tr>
            <td><strong>Breed Certification</strong><br /><i>(if only renewing cat identification tags, please select the
                Cat renewal only box)</i>
            </td>
        </tr>
        <tr height="10">
            <td>
            </td>
        </tr>
        <tr>
            <td><input type="radio" name="DogOrCat" value="No Pit Bull - Declared" />I am the Owner of the
                above indicated dog(s) and the dog(s) is/are not Pit Bull dog(s)<br />     as defined in the
                City of London's Pit Bull dog licensing by-law.
            </td>
        </tr>
        <tr>
            <td><input type="radio" name="DogOrCat" value="Cat renewal only" />Cat renewal only</td>
        </tr>
      </table>
      <p> </p>
      <p>Notes: If amount to be paid does not match amount invoiced, please explain
      in the box provided.<b>*</b></p>
      <p>    <textarea rows="4" name="Notes" cols="72" tabindex="34" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></textarea></p>
      <p><b>*If spay/neuter has occurred in past year, please provide veterinary
      name and phone number for follow up.</b></p>
            <p align="center"> 
              <input type="submit" value="Submit" name="B1">
              <input type="reset" value="Reset" name="B2">
            </p>
          </form>
    </table>
    
    
    <?php
       } else {
          error_reporting(0);
          $recipient = 'contact@justspiffy.ca';
      $ID_Number = stripslashes($_POST['ID_Number']);
          $Surname = stripslashes($_POST['Surname']);
      $Given_name = stripslashes($_POST['Given_name']);
      $Email_Address = stripslashes($_POST['Email_Address']);
          $Contact_Change = stripslashes($_POST['Contact_Change']);
          $Address = stripslashes($_POST['Address']);
      $Municipality = stripslashes($_POST['Municipality']);
          $Province = stripslashes($_POST['Province']);
      $Postal_Code = stripslashes($_POST['Postal_Code']);
          $Phone_Home = stripslashes($_POST['Phone_Home']);
          $Phone_Work = stripslashes($_POST['Phone_Work']);
          $Phone_Work_Extension = stripslashes($_POST['Phone_Work_Extension']);
      $Card_Type = stripslashes($_POST['Card_Type']);
      $CreditCardName = stripslashes($_POST['CreditCardName']);
          $CardNumber = stripslashes($_POST['CardNumber']);
          $CardNumber1 = stripslashes($_POST['CardNumber1']);
          $CardNumber2 = stripslashes($_POST['CardNumber2']);
          $CardNumber3 = stripslashes($_POST['CardNumber3']);
      $Expiry_Month = stripslashes($_POST['Expiry_Month']);
          $Expiry_Year = stripslashes($_POST['Expiry_Year']);
          $Amount_Paid = stripslashes($_POST['Amount_Paid']);
      $vet_clinic_name = stripslashes($_POST['vet_clinic_name']);
      $Animal1_Name = stripslashes($_POST['Animal1_Name']);
          $Rabies_Month_Animal1 = stripslashes($_POST['Rabies_Month_Animal1']);
          $Rabies_Year_Animal1 = stripslashes($_POST['Rabies_Year_Animal1']);
          $Animal2_Name = stripslashes($_POST['Animal2_Name']);
          $Rabies_Month_Animal2 = stripslashes($_POST['Rabies_Month_Animal2']);
      $Rabies_Year_Animal2 = stripslashes($_POST['Rabies_Year_Animal2']);
      $Animal3_Name = stripslashes($_POST['Animal3_Name']);
      $Rabies_Month_Animal3 = stripslashes($_POST['Rabies_Month_Animal3']);
      $Rabies_Year_Animal3 = stripslashes($_POST['Rabies_Year_Animal3']);
      $DogOrCat = stripslashes($_POST['DogOrCat']);
      $Notes = stripslashes($_POST['Notes']);
          
          $sendto = $_POST['Email_Address'];
          $headers = "From: $recipient\r\n\r\n";
          $subject = "Dog & Cat Tag Renewal";
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.<br />
    
    			  Your confirmation Id is \n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $ID_Number\r\n
          Name: $Surname  $Given_name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Contact_Change\r\n
          Address: $Address\r\n
          Municipality: $Municipality\r\n
          Province: $Province\r\n
      Postal Code: $Postal_Code\r\n
          Phone # - Home: $Phone_Home\r\n
          Phone # - Work: $Phone_Work\r\n
          Work Ext: $Phone_Work_Extension\r\n
          Card Type: $Card_Type\r\n
          Name of Cardholder: $CreditCardName\r\n
          Card #: XXXX-XXXX-XXXX-$CardNumber3\r\n
          Expiry Date: $Expiry_Month  $Expiry_Year\r\n
          Please indicate amount to be paid: $Amount_Paid\r\n
          Veterinarian Clinic Name: $vet_clinic_name\r\n
          Name of First Animal: $Animal1_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal1  $Rabies_Year_Animal1\r\n
      Name of Second Animal: $Animal2_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal2  $Rabies_Year_Animal2\r\n
          Name of Third Animal: $Animal3_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal3  $Rabies_Year_Animal3\r\n
          Breed Certification: $DogOrCat\r\n
          Notes: $Notes\r\n
          ";
          // Send mail to customer, refer to http://php.net/manual/en/function.mail.php
          mail($sendto, $subject, $message, $headers);
          if (!mail) {
              echo "Message failed to send, please notify our Web Team.";
          } else {
              echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you. Your request has been sent and we will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>");
          }
          // Send mail to company
          $to = "contact@justspiffy.ca"; // who gets this one?
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.<br />
    
    			  Your confirmation Id is \n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $ID_Number\r\n
          Name: $Surname  $Given_name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Contact_Change\r\n
          Address: $Address\r\n
          Municipality: $Municipality\r\n
          Province: $Province\r\n
      Postal Code: $Postal_Code\r\n
          Phone # - Home: $Phone_Home\r\n
          Phone # - Work: $Phone_Work\r\n
          Work Ext: $Phone_Work_Extension\r\n
          Card Type: $Card_Type\r\n
          Name of Cardholder: $CreditCardName\r\n
          Card #: $CardNumber $CardNumber1 $CardNumber2 $CardNumber3\r\n
          Expiry Date: $Expiry_Month  $Expiry_Year\r\n
          Please indicate amount to be paid: $Amount_Paid\r\n
          Veterinarian Clinic Name: $vet_clinic_name\r\n
          Name of First Animal: $Animal1_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal1  $Rabies_Year_Animal1\r\n
      Name of Second Animal: $Animal2_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal2  $Rabies_Year_Animal2\r\n
          Name of Third Animal: $Animal3_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal3  $Rabies_Year_Animal3\r\n
          Breed Certification: $DogOrCat\r\n
          Notes: $Notes\r\n
          ";
          mail($to, $subject, $message, $headers);
           if (!mail) {
              echo "Message failed to send. Please notify our Web Team.";
          } else {
              // something here to notify the web team if it fails.
          }
    }
    ?>
    
    
    
    <p>    
    <!-- Seal verification code START -->  <!-- Seal verification code END --></p>
    </body>
    </html>
    [code]
    
    

  10. Hi there,

    I am new to PHP and I am having an issue creating a form that sends conformation to two different people. One needs to be sent to the person who fills the form out and one needs to be sent to the company who made the form.

     

    What also needs to happen, is there is a field that asks the customer to enter their credit card. When the person who fills the form out receive the confirmation email, I need the credit card info to be X X X'd out. And when the company receives the email the credit card needs to be visible.

     

    I have tried and what I have come up with sends 2 emails to both customer and company. They both receive 2 emails, one with it X X X'd out and another with the credit card, but that is not what I want. I need only 1 email each, customer with the credit card X X X'd out and company with it visible. Can anyone help me?

     

    Here is my code:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Cat & Dog Tag Renewal Form</title>
    <script language="javascript" type="text/javascript">
    //<![CDATA[
    var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" :
    "http://www.trustlogo.com/trustlogo/javascript/trustlogo.js";
    document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
    //]]>
    </script>
    
    </head>
    
    <body topmargin ="0" leftmargin="0" marginwidth="0" marginheight="0" onLoad="createExpiry();">
    
    <p><img border="0" src="images/header.jpg" width="675" height="119"></p>
    
    <table border="0" width="800" cellspacing="0" cellpadding="0">
      <tr>
        <td width="3%"></td>
        <td width="97%">
    
    <?php
    if ($_SERVER['REQUEST_METHOD'] != 'POST'){
          $me = $_SERVER['PHP_SELF'];
    
    ?>
    
    
    <form name="form1" method="post"
             action="<?php echo $me;?>">
    <table border="0" width="483" height="48" cellspacing="0" cellpadding="0">
        <tr>
          <td width="114" height="19" valign="middle">Please Enter ID #:</td>
          <td width="160" height="19" align="center" valign="middle">
           
      <input type="text" name="ID_Number" size="22" tabindex="1" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
          <td width="203" height="19" align="center">
      (found above surname on your invoice)</td>
        </tr>
        <tr>
          <td width="114" height="19"></td>
          <td width="160" height="19" align="center"></td>
          <td width="203" height="19" align="center"></td>
        </tr>
        <tr>
          <td width="114" height="19" valign="bottom">Name:</td>
          <td width="160" height="19" align="center">
           
      <input type="text" name="Surname" size="22" tabindex="2" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
          <td width="203" height="19" align="center" valign="bottom">
           
      <input type="text" name="Given_Name" size="25" tabindex="3" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="114" height="17"></td>
          <td width="160" height="17" align="center">(Surname)</td>
          <td width="203" height="17" align="center">(Given)</td>
        </tr>
        <tr>
          <td width="114" height="17">E-Mail Address:</td>
          <td width="363" height="17" align="center" colspan="2">
            <p align="left"> 
    	<input type="text" name="Email_Address" size="42" tabindex="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
         <tr height=5>
             <td align="center" colspan="3">
             </td>
         </tr>
         <tr>
             <td align=center colspan=3>
                <font size=2>*a confirmation number will be emailed to the above addess upon submission</font>
             </td>
         </tr>
         <tr height=15>
             <td align="center" colspan="3">
             </td>
         </tr>
    </table>
      <table width="485" height="50" cellspacing="0" cellpadding="2" style="border-width:1px;border-color:#ff0000;border-style:solid">
        <tr>
           <td colspan="2" width="485" height="19">Have you had a change in address or phone number over the last year?</td>
        </tr>
        <tr>
           <td><input type="radio" value="change_yes" name="Contact_Change" tabindex="5">Yes</td>
        </tr>
        <tr>
           <td><input type="radio" value="change_no" name="Contact_Change" tabindex="6">No</td>
        </tr>
      </table>
    <br/>
    <table border="0" width="485" height="100" cellspacing="0" cellpadding="0">
        <tr>
          <td width="305" height="19">Address:</td>
          <td width="390" height="19" align="left">
           
      <input type="text" name="Address" size="51" tabindex="7" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17"></td>
          <td width="390" height="17" align="left">Apt#      
            Street#         Street</td>
        </tr>
        <tr>
          <td width="305" height="15"></td>
          <td width="390" height="15" align="center"></td>
        </tr>
        <tr>
          <td width="305" height="17">Municipality:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Municipality" size="22" value="London" tabindex="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17">Province:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Province" size="22" tabindex="9" value="ON" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17">Postal Code:</td>
          <td width="390" height="17" align="left">
           
      <input type="text" name="Postal_Code" size="22" tabindex="10" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="305" height="17"></td>
          <td width="390" height="17" align="left"></td>
        </tr>
        <tr>
          <td width="305" height="17" rowspan="2">Phone #<br/>(with area code):</td>
          <td width="390" height="17" align="left">Home:
      <input type="text" name="Phone_Home" size="12" tabindex="11" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> (eg. 519-555-5555)</td>
        </tr>
        <tr>
          <td width="390" height="17" align="left">Work:      
      <input type="text" name="Phone_Work" size="12" tabindex="12" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> 
            ext: <input type="text" name="Phone_Work_Extension" size="8" tabindex="13" maxlength="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
      </table>
      <p> 
    
    
    
      </p>
      <table border="0" width="538" cellspacing="0" cellpadding="0">
        <tr>
          <td width="130"><b>Billing Information</b></td>
          <td width="234"></td>
        </tr>
        <tr>
          <td width="130" rowspan="2">
    	<!-- Authentic Trust Logo Seal verification code START -->
    	<!--
    TrustLogo Html Builder Code:
    Shows the logo at URL http://www.accpets.ca/images/trust_logo.GIF
    Logo type is  ("SC4")
    Not Floating
    //-->
    <a href="http://www.instantssl.com" id="comodoTL">SSL</a>
    <script type="text/javascript">TrustLogo("http://www.accpets.ca/images/trust_logo.GIF", "SC4", "none");</script>
    	<!-- Authentic Trust Logo Seal verification code END -->
         </td>
          <td width="234"><input type="radio" value="MasterCard" name="Card_Type" tabindex="14" checked>MasterCard</td>
        </tr>
        <tr>
          <td width="234"><input type="radio" value="Visa" name="Card_Type" tabindex="15">Visa</td>
        </tr>
        <tr>
          <td width="130"></td>
          <td width="234"></td>
        </tr>
        <tr>
                <td width="130">Name of Cardholder:</td>
          <td width="234"><input type="text" name="CreditCardName" size="45" tabindex="16" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="130">Card #: </td>
          <td width="300">
           
      <input type="text" name="CardNumber" size="4" tabindex="17" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber1" size="4" tabindex="18" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber2" size="4" tabindex="19" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">  
      <input type="text" name="CardNumber3" size="4" tabindex="20" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="130">Expiry Date: </td>
          <td width="234">
           
      <select size="1" name="Expiry_Month" tabindex="21" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option>01</option>
              <option>02</option>
              <option>03</option>
              <option>04</option>
              <option>05</option>
              <option>06</option>
              <option>07</option>
              <option>08</option>
              <option>09</option>
              <option>10</option>
              <option>11</option>
              <option>12</option>
            </select> 
      <select size="1" name="Expiry_Year" tabindex="22" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	  	  <option>2009</option>
              <option>2010</option>
              <option>2011</option>
              <option>2012</option>
              <option>2013</option>
              <option>2014</option>
              <option>2015</option>
              <option>2016</option>
              <option>2017</option>
              <option>2018</option>
            </select></td>
        </tr>
      </table>
      <p>Please indicate amount to be paid: $   <input type="text" name="Amount_Paid" size="13" tabindex="23" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></p>
      <p> </p>
      <table border="0" width="539" cellspacing="0" cellpadding="0" height="69">
        <tr>
          <td width="262" height="21"><b>Rabies Information</b></td>
          <td width="261" height="21"></td>
        </tr>
        <tr>
          <td width="262" height="25">Veterinarian Clinic Name</td>
          <td width="261" height="25" valign="middle">
           
      <input type="text" name="vet_clinic_name" size="20" tabindex="24" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of First Animal</td>
          <td width="261" height="23">
           
      <input type="text" name="Animal1_Name" size="20" tabindex="25" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
           
      <select size="1" name="Rabies_Month_Animal1" tabindex="26" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>  
      <select size="1" name="Rabies_Year_Animal1" tabindex="27" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>    
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>       
            </select>
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of Second Animal</td>
          <td width="261" height="23">
          <input type="text" name="Animal2_Name" size="20" tabindex="28" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
          <select size="1" name="Rabies_Month_Animal2" tabindex="29" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>
    	<select size="1" name="Rabies_Year_Animal2" tabindex="30" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>      
            </select>
                  <br>
                  <br>
                </td>
        </tr>
        <tr>
          <td width="262" height="23">Name of Third Animal</td>
          <td width="261" height="23">
          <input type="text" name="Animal3_Name" size="20" tabindex="31" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td>
        </tr>
        <tr>
          <td width="262" height="23">Month and Year of Vaccination</td>
          <td width="261" height="23">
          <select size="1" name="Rabies_Month_Animal3" tabindex="32" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>MM</option>
              <option value="January">January</option>
              <option value="February">February</option>
              <option value="March">March</option>
              <option value="April">April</option>
              <option value="May">May</option>
              <option value="June">June</option>
              <option value="July">July</option>
              <option value="August">August</option>
              <option value="September">September</option>
              <option value="October">October</option>
              <option value="November">November</option>
              <option value="December">December</option>
            </select>
    	<select size="1" name="Rabies_Year_Animal3" tabindex="33" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'">
              <option>YYYY</option>
    	    <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              <option>2005</option>
              <option>2006</option>
              <option>2007</option>
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option> 
            </select></td>
        </tr>
      </table>
      <table>
        <tr height="15">
            <td></td>
        </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" width="600">
        <tr>
            <td><strong>Breed Certification</strong><br /><i>(if only renewing cat identification tags, please select the
                Cat renewal only box)</i>
            </td>
        </tr>
        <tr height="10">
            <td>
            </td>
        </tr>
        <tr>
            <td><input type="radio" name="DogOrCat" value="No Pit Bull - Declared" />I am the Owner of the
                above indicated dog(s) and the dog(s) is/are not Pit Bull dog(s)<br />     as defined in the
                City of London's Pit Bull dog licensing by-law.
            </td>
        </tr>
        <tr>
            <td><input type="radio" name="DogOrCat" value="Cat renewal only" />Cat renewal only</td>
        </tr>
      </table>
      <p> </p>
      <p>Notes: If amount to be paid does not match amount invoiced, please explain
      in the box provided.<b>*</b></p>
      <p>    <textarea rows="4" name="Notes" cols="72" tabindex="34" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></textarea></p>
      <p><b>*If spay/neuter has occurred in past year, please provide veterinary
      name and phone number for follow up.</b></p>
            <p align="center"> 
              <input type="submit" value="Submit" name="B1">
              <input type="reset" value="Reset" name="B2">
            </p>
            </form>
    </table>
    
    
    <?php
       } else {
          error_reporting(0);
          $recipient = 'contact@justspiffy.ca';
      $ID_Number = stripslashes($_POST['ID_Number']);
          $Surname = stripslashes($_POST['Surname']);
      $Given_name = stripslashes($_POST['Given_name']);
      $Email_Address = stripslashes($_POST['Email_Address']);
          $Contact_Change = stripslashes($_POST['Contact_Change']);
          $Address = stripslashes($_POST['Address']);
      $Municipality = stripslashes($_POST['Municipality']);
          $Province = stripslashes($_POST['Province']);
      $Postal_Code = stripslashes($_POST['Postal_Code']);
          $Phone_Home = stripslashes($_POST['Phone_Home']);
          $Phone_Work = stripslashes($_POST['Phone_Work']);
          $Phone_Work_Extension = stripslashes($_POST['Phone_Work_Extension']);
      $Card_Type = stripslashes($_POST['Card_Type']);
      $CreditCardName = stripslashes($_POST['CreditCardName']);
          $CardNumber = stripslashes($_POST['CardNumber']);
          $CardNumber1 = stripslashes($_POST['CardNumber1']);
          $CardNumber2 = stripslashes($_POST['CardNumber2']);
          $CardNumber3 = stripslashes($_POST['CardNumber3']);
      $Expiry_Month = stripslashes($_POST['Expiry_Month']);
          $Expiry_Year = stripslashes($_POST['Expiry_Year']);
          $Amount_Paid = stripslashes($_POST['Amount_Paid']);
      $vet_clinic_name = stripslashes($_POST['vet_clinic_name']);
      $Animal1_Name = stripslashes($_POST['Animal1_Name']);
          $Rabies_Month_Animal1 = stripslashes($_POST['Rabies_Month_Animal1']);
          $Rabies_Year_Animal1 = stripslashes($_POST['Rabies_Year_Animal1']);
          $Animal2_Name = stripslashes($_POST['Animal2_Name']);
          $Rabies_Month_Animal2 = stripslashes($_POST['Rabies_Month_Animal2']);
      $Rabies_Year_Animal2 = stripslashes($_POST['Rabies_Year_Animal2']);
      $Animal3_Name = stripslashes($_POST['Animal3_Name']);
      $Rabies_Month_Animal3 = stripslashes($_POST['Rabies_Month_Animal3']);
      $Rabies_Year_Animal3 = stripslashes($_POST['Rabies_Year_Animal3']);
      $DogOrCat = stripslashes($_POST['DogOrCat']);
      $Notes = stripslashes($_POST['Notes']);
          
          $sendto = $_POST['Email_Address'];
          $headers = "From: $recipient\r\n\r\n";
          $subject = "Dog & Cat Tag Renewal";
          $message = "Thank you for registering your pet with London Animal Care Centre.\n
    			  Please keep this email as proof of your application for your 
    			  dog licence or cat identification tag.<br />
    
    			  Your confirmation Id is \n
    			    
    			  If you have any questions or concerns please call (519)685-1330
    			  and have your confirmation id available.\n
    			  Please allow 3 to 6 weeks for processing and delivery of your tags.\n
      
          ID #: $ID_Number\r\n
          Name: $Surname  $Given_name\r\n
          E-Mail Address: $Email_Address\r\n
          Have you had a change in address or phone number over the last year?: $Contact_Change\r\n
          Address: $Address\r\n
          Municipality: $Municipality\r\n
          Province: $Province\r\n
      Postal Code: $Postal_Code\r\n
          Phone # - Home: $Phone_Home\r\n
          Phone # - Work: $Phone_Work\r\n
          Work Ext: $Phone_Work_Extension\r\n
          Card Type: $Card_Type\r\n
          Name of Cardholder: $CreditCardName\r\n
          Card #: XXXX-XXXX-XXXX-$CardNumber3\r\n
          Expiry Date: $Expiry_Month  $Expiry_Year\r\n
          Please indicate amount to be paid: $Amount_Paid\r\n
          Veterinarian Clinic Name: $vet_clinic_name\r\n
          Name of First Animal: $Animal1_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal1  $Rabies_Year_Animal1\r\n
      Name of Second Animal: $Animal2_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal2  $Rabies_Year_Animal2\r\n
          Name of Third Animal: $Animal3_Name\r\n
          Month and Year of Vaccination: $Rabies_Month_Animal3  $Rabies_Year_Animal3\r\n
          Breed Certification: $DogOrCat\r\n
          Notes: $Notes\r\n
          ";
          // Send mail to customer, refer to http://php.net/manual/en/function.mail.php
          mail($recipient, $subject, $message, $headers, $sendto);
          if (!mail) {
              echo "Message failed to send, please notify our Web Team.";
          } else {
              echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you. Your request has been sent and we will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>");
          }
          // Send mail to company
          $to = "contact@justspiffy.ca"; // who gets this one?
          $from = $sendto; // Set From to the person who filled out the form
          $card = "$CardNumber $CardNumber1  $CardNumber2  $CardNumber3\r\n"; // build the credit card number
          $message = "$message1 $card"; // tack the CC number to end of the message you already built above
          mail($to, $subject, $message, $headers, $from);
           if (!mail) {
              echo "Message failed to send. Please notify our Web Team.";
          } else {
              // something here to notify the web team if it fails.
          }
    }
    ?>
    
    
    
    <p>    
    <!-- Seal verification code START -->  <!-- Seal verification code END --></p>
    </body>
    </html>
    
    

     

  11. Hey everyone. I finally found some time to finish off with this form and I believe the problem is coming from the cofirmation page. I need to put some scripting that will send the email itself. I have the scripting to copy the var over to the confirmation page, but the email doesnt come to me. Here is the code for the confirmation page. Any help would be great.

     

    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Online Application Confirmation</title>
    <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta name="Microsoft Theme" content="none, default">
    <meta name="Microsoft Border" content="none, default">
    </head>
    
    <body>
    
    <div align="left">
    <table border="0" width="100%" cellspacing="5" cellpadding="5" id="table44">
    	<tr>
    		<td valign="top" width="100%">
    		<div align="left">
    			<table border="0" width="100%" cellspacing="0" cellpadding="5" id="table45">
    				<tr>
    					<td>
    					<p align="center">
    					<font face="Arial Black" style="font-size: 26pt" color="#000080">
    					Application Confirmation - Thank You</font></td>
    					<td width="15%">
    					<p align="center">
    					<img border="0" src="images/Odd%20Fellow%20Logo.gif" width="160" height="50"></td>
    				</tr>
    			</table>
    			<div align="left">
    				<table border="1" width="100%" id="table46">
    					<tr>
    						<td>
    
    
    
    
    
    						<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table47">
    							<tr>
    								<td>
    						<font size="2" face="Arial"><br>
    						Dear
    						<strong><?php echo $_POST['Applicants_Name']; ?></strong>,</font><p>
    						<font size="2" face="Arial">Thank you for sending us 
    						your
    						application. We will be forwarding your application 
    						to the lodge nearest your home and have someone 
    						contact you in the next<br>
    						couple of business days, we will be 
    						using the following information:</font></p>
    						<blockquote>
    							<p><font face="Arial"><strong><font size="2">
    							Name: </font></strong></font>
    						<font size="2" face="Arial">
    						<strong><?php echo $_POST['Applicants_Name']; ?></strong></font><font face="Arial"><strong><font size="2"><br>
    							Address: </font></strong><font size="2">
    						<strong><?php echo $_POST['Applicants_Address']; ?></strong></font><strong><font size="2"><br>
    							City: </font></strong><font size="2">
    							<strong><?php echo $_POST['Applicants_City']; ?></strong></font><strong><font size="2"><br>
    							Postal Code: </font></strong><font size="2">
    							<strong><?php echo $_POST['Applicants_Postal_Code']; ?></strong></font><strong><font size="2"><br>
    							</font></strong><font size="2">
    							<strong>Telephone:</strong>
    						<strong><?php echo $_POST['Applicants_Home_Phone_Number']; ?></strong></font><strong><font size="2"><br>
    							E-mail:</font></strong><font size="2">
    							<strong><?php echo $_POST['Applicants_Email_Address']; ?></strong><br>
    							 </font></font></p>
    						</blockquote>
    						<p><font size="2" face="Arial">If any of this 
    						information is incorrect, please go back (use your 
    						browsers back button) to the 
    						feedback form and change it. We thank you for taking 
    						the time to help us be a become a larger 
    						Organization.</font></p>
    						<blockquote>
    							<blockquote>
    								<blockquote>
    									<p><font size="2" face="Arial">
    									Sincerely,<br>
    									<br>
    									</font><font face="Lucida Calligraphy">
    									<b>Barry Smith</b></font></p>
    									<p><em><font face="Arial" size="2">Barry 
    									Smith, Webmaster for The Grand Lodge of 
    									Ontario of the Independent Order of Odd 
    									Fellows</font></em></p>
    								</blockquote>
    							</blockquote>
    						</blockquote>
    						<hr>
    						<p align="center"><font face="Arial" size="2"><a href="javascript:window.close();">Click here to Close this Window</a></font><br>
     </td>
    							</tr>
    							</table>
    						</td>
    					</tr>
    				</table>
    			</div>
    		</div>
    		</td>
    	</tr>
    	</table>
    </div>
    
    </body>
    
    </html>
    
    

  12. ok, so I have figured out this much. I wonder if it has something to do with

     

    <?php

    if ($_SERVER['REQUEST_METHOD'] != 'POST'){

          $me = $_SERVER['PHP_SELF'];

     

    ?>

     

    <form method="POST" action="online_application_confirmation.php" onSubmit="" name="Application Form">

     

    When I change the action to "<?php echo $me;?>" i get the email confirmation, but of course it just shows the confirmation on the same page. If i leave it as above, it goes to the seperate confirmation page, but I do not get the email...

    would it have anything to do with this  $me = $SERVER['PHP_SELF'];    ? because it is not going to itself, it is going to another page?

  13. I have a few other forms running off of the same server, and they all seem fine. The only different between them and this form, is that is takes you to the  seperate confirmation page where are the other ones give a confirmation on the same page. I am pretty new to PHP, so im not sure if that would make a difference or not

  14. Hey everyone,

     

    I am having some trouble with a simple form I have created. When the form is submitted, it is suppose to show you confirmation (which is does just fine) and send an email to me with the information from the form. For some reason, I am not receiving the email!! I've looked it over a bunch of time and not sure what I am missing. Could someone take a quick peek for me?!

     

    Here is the code

     

    <?php
    if ($_SERVER['REQUEST_METHOD'] != 'POST'){
          $me = $_SERVER['PHP_SELF'];
    
    ?>
    
    <form method="POST" action="online_application_confirmation.php" onSubmit="" name="Application Form">
         
        <table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="table42">
          <tr>
            <td width="100%"><font face="Arial"><font size="2">Date: </font>
            <select size="1" name="Month_Applying">
            <option selected>Select Month</option>
            <option>January</option>
            <option>February</option>
            <option>March</option>
            <option>April</option>
            <option>May</option>
            <option>June</option>
            <option>July</option>
            <option>August</option>
            <option>September</option>
            <option>October</option>
            <option>November</option>
            <option>December</option>
            </select><font size="2"> </font><select size="1" name="Day_Applying">
            <option selected>1</option>
            <option>2</option>
            <option>3</option>
            <option>4</option>
            <option>5</option>
            <option>6</option>
            <option>7</option>
            <option>8</option>
            <option>9</option>
            <option>10</option>
            <option>11</option>
            <option>12</option>
            <option>13</option>
            <option>14</option>
            <option>15</option>
            <option>16</option>
            <option>17</option>
            <option>18</option>
            <option>19</option>
            <option>20</option>
            <option>21</option>
            <option>22</option>
            <option>23</option>
            <option>24</option>
            <option>25</option>
            <option>26</option>
            <option>27</option>
            <option>28</option>
            <option>29</option>
            <option>30</option>
            <option>31</option>
            </select><font size="2">, 2008.</font></font><p>
              <br>
         I, 
              <input type="text" name="Person_Applying" size="25" value="Please enter your full name">,
              <font face="Arial" size="2">apply for membership to your Order, to the 
              Officers and Members of<br>
              <select size="1" name="Closest_City_To_Person_Applying">
              <option selected>Please pick the closest city to you...</option>
              <option>Ancaster</option>
              <option>Amprior</option>
              <option>Aurora</option>
              <option>Aylmer</option>
              <option>Barrie</option>
              <option>Beachville</option>
              <option>Belleville</option>
              <option>Belmont</option>
              <option>Blenheim</option>
              <option>Bowmanville</option>
              <option>Bracebridge</option>
              <option>Brampton</option>
              <option>Brantford</option>
              <option>Brinston</option>
              <option>Brockville</option>
              <option>Brooklin</option>
              <option>Brucefield</option>
              <option>Brussels</option>
              <option>Burford</option>
              <option>Cambridge</option>
              <option>Campbellford</option>
              <option>Cayuga</option>
              <option>Chapleau</option>
              <option>Cobourg</option>
              <option>Collingwood</option>
              <option>Delhi</option>
              <option>Dresden</option>
              <option>Dundas</option>
              <option>Durham</option>
              <option>Dutton</option>
              <option>Elmvale</option>
              <option>Essex</option>
              <option>Etobicoke</option>
              <option>Exeter</option>
              <option>Florence</option>
              <option>Forest</option>
              <option>Gananoque</option>
              <option>Glanworth</option>
              <option>Glencoe</option>
              <option>Gravenhurst</option>
              <option>Guelph</option>
              <option>Hamilton</option>
              <option>Harrietsville</option>
              <option>Harrow</option>
              <option>Harrowsmith</option>
              <option>Havelock</option>
              <option>Huntsville</option>
              <option>Ingersol</option>
              <option>Ingleside</option>
              <option>Jarvis</option>
              <option>Keewatin</option>
              <option>Kemptville</option>
              <option>Kincardine</option>
              <option>Kingston</option>
              <option>Little Britain</option>
              <option>London</option>
              <option>Lyn</option>
              <option>Madac</option>
              <option>Melbourne</option>
              <option>Midland</option>
              <option>Millbrook</option>
              <option>Milton</option>
              <option>Mooretown</option>
              <option>Mount Brydges</option>
              <option>Nepean</option>
              <option>North Bay</option>
              <option>Oakville</option>
              <option>Oil Springs</option>
              <option>Orillia</option>
              <option>Orangeville</option>
              <option>Osgoode</option>
              <option>Ottawa</option>
              <option>Parham</option>
              <option>Parry Sound</option>
              <option>Peterborough</option>
              <option>Petrolia</option>
              <option>Picton</option>
              <option>Port Colborne</option>
              <option>Port Hope</option>
              <option>Port Perry</option>
              <option>Prescott</option>
              <option>Princeton</option>
              <option>Ridgetown</option>
              <option>Ruthven</option>
              <option>Sault Ste. Marie</option>
              <option>Shedden</option>
              <option>Simcoe</option>
              <option>South Mountain</option>
              <option>Springfield</option>
              <option>St. Catharines</option>
              <option>St. Marys</option>
              <option>St. Thomas</option>
              <option>Stratford</option>
              <option>Sudbury</option>
              <option>Tara</option>
              <option>Thamesford</option>
              <option>Thamesville</option>
              <option>Thessalon</option>
              <option>Thornbury</option>
              <option>Thunder Bay</option>
              <option>Tillsburg</option>
              <option>Tiverton</option>
              <option>Toronto</option>
              <option>Trenton</option>
              <option>Tweed</option>
              <option>Wallaceburg</option>
              <option>Wheatley</option>
              <option>Whitby</option>
              <option>Wiarton</option>
              <option>Williamsburg</option>
              <option>Woodslee</option>
              <option>Wyoming</option>
              </select>, 
              Independent Order of Odd Fellows, working under the jurisdiction of 
              the Grand Lodge of Ontario of the Independent Order of Odd Fellows.<br>
              <br>
         I respectfully request admission into your Lodge by 
              initiation and I promise and agree that, if elected, I will conform to 
              the Constitution and Bylaws of your Lodge and those governing the 
              Grand Lodge of Ontario. I will seek remedy for all rights on account 
              of said membership or connection therewith in the tribunals of the 
              Order only, without resorting to their enforcement in any event, or 
              for any purpose, to the civil courts. <br>
              <br>
         I believe in a Supreme Being and I am loyal to my 
              country.<br>
              <br>
              Sponsor (if any,):<input type="text" name="Sponsors_Name" size="35" value="Enter Sponsor's Name here"> 
              and
              <select size="1" name="Sponsors_Lodge_Name">
              <option selected>Please pick your Sponsors Lodge</option>
              <option>I am not sure what it is</option>
              <option>Ancaster</option>
              <option>Amprior</option>
              <option>Aurora</option>
              <option>Aylmer</option>
              <option>Barrie</option>
              <option>Beachville</option>
              <option>Belleville</option>
              <option>Belmont</option>
              <option>Blenheim</option>
              <option>Bowmanville</option>
              <option>Bracebridge</option>
              <option>Brampton</option>
              <option>Brantford</option>
              <option>Brinston</option>
              <option>Brockville</option>
              <option>Brooklin</option>
              <option>Brucefield</option>
              <option>Brussels</option>
              <option>Burford</option>
              <option>Cambridge</option>
              <option>Campbellford</option>
              <option>Cayuga</option>
              <option>Chapleau</option>
              <option>Cobourg</option>
              <option>Collingwood</option>
              <option>Delhi</option>
              <option>Dresden</option>
              <option>Dundas</option>
              <option>Durham</option>
              <option>Dutton</option>
              <option>Elmvale</option>
              <option>Essex</option>
              <option>Etobicoke</option>
              <option>Exeter</option>
              <option>Florence</option>
              <option>Forest</option>
              <option>Gananoque</option>
              <option>Glanworth</option>
              <option>Glencoe</option>
              <option>Gravenhurst</option>
              <option>Guelph</option>
              <option>Hamilton</option>
              <option>Harrietsville</option>
              <option>Harrow</option>
              <option>Harrowsmith</option>
              <option>Havelock</option>
              <option>Huntsville</option>
              <option>Ingersol</option>
              <option>Ingleside</option>
              <option>Jarvis</option>
              <option>Keewatin</option>
              <option>Kemptville</option>
              <option>Kincardine</option>
              <option>Kingston</option>
              <option>Little Britain</option>
              <option>London</option>
              <option>Lyn</option>
              <option>Madac</option>
              <option>Melbourne</option>
              <option>Midland</option>
              <option>Millbrook</option>
              <option>Milton</option>
              <option>Mooretown</option>
              <option>Mount Brydges</option>
              <option>Nepean</option>
              <option>North Bay</option>
              <option>Oakville</option>
              <option>Oil Springs</option>
              <option>Orillia</option>
              <option>Orangeville</option>
              <option>Osgoode</option>
              <option>Ottawa</option>
              <option>Parham</option>
              <option>Parry Sound</option>
              <option>Peterborough</option>
              <option>Petrolia</option>
              <option>Picton</option>
              <option>Port Colborne</option>
              <option>Port Hope</option>
              <option>Port Perry</option>
              <option>Prescott</option>
              <option>Princeton</option>
              <option>Ridgetown</option>
              <option>Ruthven</option>
              <option>Sault Ste. Marie</option>
              <option>Shedden</option>
              <option>Simcoe</option>
              <option>South Mountain</option>
              <option>Springfield</option>
              <option>St. Catharines</option>
              <option>St. Marys</option>
              <option>St. Thomas</option>
              <option>Stratford</option>
              <option>Sudbury</option>
              <option>Tara</option>
              <option>Thamesford</option>
              <option>Thamesville</option>
              <option>Thessalon</option>
              <option>Thornbury</option>
              <option>Thunder Bay</option>
              <option>Tillsburg</option>
              <option>Tiverton</option>
              <option>Toronto</option>
              <option>Trenton</option>
              <option>Tweed</option>
              <option>Wallaceburg</option>
              <option>Wheatley</option>
              <option>Whitby</option>
              <option>Wiarton</option>
              <option>Williamsburg</option>
              <option>Woodslee</option>
              <option>Wyoming</option>
              </select><br>
              <br>
              <i>Applicant Information:<br>
              <br>
              </i>Name: 
              <input type="text" name="Applicants_Name" size="40" value="Please enter your Full Name"><br>
              <br>
              I was born in 
              <input type="text" name="Applicants_City_Of_Birth" size="30" value="The city you were born in"> on the
              <select size="1" name="Day_Born">
              <option selected>1st</option>
              <option>2nd</option>
              <option>3rd</option>
              <option>4th</option>
              <option>5th</option>
              <option>6th</option>
              <option>7th</option>
              <option>8th</option>
              <option>9th</option>
              <option>10th</option>
              <option>11th</option>
              <option>12th</option>
              <option>13th</option>
              <option>14th</option>
              <option>15th</option>
              <option>16th</option>
              <option>17th</option>
              <option>18th</option>
              <option>19th</option>
              <option>20th</option>
              <option>21st</option>
              <option>22nd</option>
              <option>23rd</option>
              <option>24th</option>
              <option>25th</option>
              <option>26th</option>
              <option>27th</option>
              <option>28th</option>
              <option>29th</option>
              <option>30th</option>
              <option>31st</option>
              </select> day of <select size="1" name="Month_Born">
              <option selected>Select Month</option>
              <option>January</option>
              <option>February</option>
              <option>March</option>
              <option>April</option>
              <option>May</option>
              <option>June</option>
              <option>July</option>
              <option>August</option>
              <option>September</option>
              <option>October</option>
              <option>November</option>
              <option>December</option>
              </select>, <select size="1" name="Year_Born">
              <option>1925</option>
              <option>1926</option>
              <option>1927</option>
              <option>1928</option>
              <option>1929</option>
              <option>1930</option>
              <option>1931</option>
              <option>1932</option>
              <option>1933</option>
              <option>1934</option>
              <option>1935</option>
              <option>1936</option>
              <option>1937</option>
              <option>1938</option>
              <option>1939</option>
              <option>1940</option>
              <option>1941</option>
              <option>1942</option>
              <option>1943</option>
              <option>1944</option>
              <option>1945</option>
              <option>1946</option>
              <option>1947</option>
              <option>1948</option>
              <option>1949</option>
              <option selected>1950</option>
              <option>1951</option>
              <option>1952</option>
              <option>1953</option>
              <option>1954</option>
              <option>1955</option>
              <option>1956</option>
              <option>1957</option>
              <option>1958</option>
              <option>1959</option>
              <option>1960</option>
              <option>1961</option>
              <option>1962</option>
              <option>1963</option>
              <option>1964</option>
              <option>1965</option>
              <option>1966</option>
              <option>1967</option>
              <option>1968</option>
              <option>1969</option>
              <option>1970</option>
              <option>1971</option>
              <option>1972</option>
              <option>1973</option>
              <option>1974</option>
              <option>1975</option>
              <option>1976</option>
              <option>1977</option>
              <option>1978</option>
              <option>1979</option>
              <option>1980</option>
              <option>1981</option>
              <option>1982</option>
              <option>1983</option>
              <option>1984</option>
              <option>1985</option>
              <option>1986</option>
              <option>1987</option>
              <option>1988</option>
              <option>1989</option>
              <option>1990</option>
              <option>1991</option>
              <option>1992</option>
              <option>1993</option>
              <option>1994</option>
              <option>1995</option>
              <option>1996</option>
              <option>1997</option>
              <option>1998</option>
              <option>1999</option>
              <option>2000</option>
              <option>2001</option>
              <option>2002</option>
              <option>2003</option>
              <option>2004</option>
              </select>.<br>
              <br>
              Street Address:</font><font face="Arial">
          <input type="text" name="Applicants_Address" size="28">    </font>
          <font size="2" face="Arial"> City:</font><font face="Arial">
          <input type="text" name="Applicants_City" size="24"><br>
              <br>
          </font>
          <font size="2" face="Arial">Province: 
              <select size="1" name="Applicants_Province">
              <option>Alberta</option>
              <option>British Columbia</option>
              <option>Manitoba</option>
              <option>New Brunswick</option>
              <option>Newfoundland & Labrador</option>
              <option>Northwest Territories</option>
              <option>Nova Scotia</option>
              <option>Nunavut</option>
              <option selected>Ontario</option>
              <option>Prince Edward Island</option>
              <option>Quebec</option>
              <option>Saskatchewan</option>
              <option>Yukon</option>
              </select>     Postal Code: </font><font face="Arial"> 
              <input type="text" name="Applicants_Postal_Code" size="7"><br>
              <br>
          </font>
          <font size="2" face="Arial">Home Phone Number: </font>
          <font face="Arial">
          <input type="text" name="Applicants_Home_Phone_Number" size="12">    
              Email Address: 
              <input type="text" name="Applicants_Email_Address" size="25" value="No email, just leave empty"><br>
              <font size="1">(Phone Number with area code)</font><br>
              <br>
          </font>
          <font size="2" face="Arial">Applicant's 
              Signature:_____________________________<br>
                                       
          </font><font face="Arial" size="1">To Be Signed at a later date.<br>
     </font></p>
              <table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="table43">
                <tr>
                  <td width="100%">
                  <p align="center"><input type="submit" value="Submit" name="B1">    
                  <input type="reset" value="Reset" name="B2"></td>
                </tr>
              </table>
            
            </td>
          </tr>
        </table></form>
    <?php
       } else {
          error_reporting(0);
          $recipient = 'sgigacz@cyg.net';
      $Month_Applying = stripslashes($_POST['Month_Applying']);
          $Day_Applying = stripslashes($_POST['Day_Applying']);
      $Person_Applying = stripslashes($_POST['Person_Applying']);
      $Closest_City_To_Person_Applying = stripslashes($_POST['Closest_City_To_Person_Applying']);
          $Sponsors_Name = stripslashes($_POST['Sponsors_Name']);
          $Sponsors_Lodge_Name = stripslashes($_POST['Sponsors_Lodge_Name']);
          $Applicants_Name = stripslashes($_POST['Applicants_Name']);
      $Applicants_City_Of_Birth = stripslashes($_POST['Applicants_City_Of_Birth']);
          $Day_Born = stripslashes($_POST['Day_Born']);
          $Month_Born = stripslashes($_POST['Month_Born']);
          $Year_Born = stripslashes($_POST['Year_Born']);
      $Applicants_Address = stripslashes($_POST['Applicants_Address']);
      $Applicants_City = stripslashes($_POST['Applicants_City']);
      $Applicants_Province = stripslashes($_POST['Applicants_Province']);
      $Applicants_Postal_Code = stripslashes($_POST['Applicants_Postal_Code']);
      $Applicants_Home_Phone_Number = stripslashes($_POST['Applicants_Home_Phone_Number']);
      $Applicants_Email_Address = stripslashes($_POST['Applicants_Email_Address']);
         
          
          $headers = "From: $Applicants_Email_Address\r\n\r\n";
          $subject = "Online Application Form";
          $message = "Month Applying: $Month_Applying\r\n
          Day Applying: $Day_Applying\r\n
          Person Applying: $Person_Applying\r\n
          Closest City To Person Applying: $Closest_City_To_Person_Applying\r\n
          Sponsors Name: $Sponsors_Name\r\n
          Sponsors Lodge Name: $Sponsors_Lodge_Name\r\n
          Applicants Name: $Applicants_Name\r\n
          Applicants City Of Birth: $Applicants_City_Of_Birth\r\n
          Day Born: $Day_Born\r\n
      Month Born: $Month_Born\r\n
      Year Born: $Year_Born\r\n
      Applicants Address: $Applicants_Address\r\n
      Applicants City: $Applicants_City\r\n
      Applicants Province: $Applicants_Province\r\n
      Applicants Postal Code: $Applicants_Postal_Code\r\n
      Applicants Home Phone Number: $Applicants_Home_Phone_Number\r\n
      Applicants Email Address: $Applicants_Email_Address\r\n
          <br />
          "; 
          mail($recipient, $subject, $message, $headers);
          if (!mail) {
              echo "Message failed to send";
          } else {
              
          }
    }
    ?>
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.