Web Analytics Made Easy -
StatCounter php captcha error display issue - CodingForum

Announcement

Collapse
No announcement yet.

php captcha error display issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • php captcha error display issue

    My PHP captcha is working correctly, however, when the code is entered incorrectly, the page shows the error, but not the form after it. I don't think it's a redirect issue because it's still the same form URL. I know this is a simple fix, but my brain is fried. Help, please?

    PHP Code:
    if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='')  { 
         echo  
    '<strong>Incorrect verification code. Please <a href="">go back</a> and try again.</strong><br>'
    }
     else { 
    after the else comes the rest of my form code. ideas as to why my html/php form won't display after the error echos in the page?

    Thank you in advance!
    "Loo loo loo, I've got some apples, loo loo loo, you've got some, too!" - Butters

  • #2
    your code is ok. where is that part of the script which is printing a form?
    custom web development rubyroid.com

    Comment


    • #3
      Here's my whole page, just a relatively short one. I know it's just one small error but geeze! lol

      PHP Code:
      <?php
      session_start
      ();
      ?>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <title></title>
      <meta name="description" content="">
      <meta name="keywords" content="">
      <link href="style.css" rel="stylesheet" type="text/css">
      <script>
      function run_movie(arg)
      {
      document.write(arg);

      </script>
      </head>
      <body>
      <table border="0" cellpadding="0" cellspacing="0" align="center">
          <tr>
              <td><script type="text/javascript">run_movie('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="739" height="265" id="flash" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#878e9a" /><embed src="flash.swf" quality="high" bgcolor="#878e9a" width="739" height="265" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');</script></td>

          </tr>
          <tr>
              <td width="739" style="background: #494F59">
                  <table border="0" cellpadding="0" cellspacing="0" width="100%">
                         <tr>
                             <td height="3" valign="top"><img src="images/c1.gif" width="2" height="2" border="0" alt=""></td>
                          <td align="right" valign="top"><img src="images/c2.gif" width="2" height="2" border="0" alt=""></td>
                         </tr>
                  </table>

                  <table border="0" cellpadding="0" cellspacing="0" align="center" style="background: url(images/page_bg.gif) repeat-x #5E646F; width: 733px;">
                      <tr>
                          <td valign="top" height="358">
                          <div style="padding: 6px;">
                              <table border="0" cellpadding="0" cellspacing="0" width="195" style="background: url(images/search_bg.jpg) no-repeat">
                                  <tr>
                                      <td height="344" valign="top" align="center">
                                          <table border="0" cellpadding="0" cellspacing="0" width="154">
                                              <tr>
                                                  <td><div style="padding: 18px 0 5px 5px"><img src="images/text_find_a_home.gif" width="78" height="10" border="0" alt=""></div></td>

                                              </tr>
                                              <?php include('nav.txt'?>
                                              </table>
                                      </td>
                                  </tr>
                              </table>
                          </div></td>
                          <td><img src="images/spacer.gif" width="14" height="1" border="0" alt=""></td>
                          <td valign="top" colspan="2" style="padding-right: 7px;">
                              <div style="padding: 25px 0 5px 4px"><img src="images/" width="280" height="11" border="0" alt="Tenant Services (Current Home Owners)"></div>
                              <div><img src="images/pix_lbl.gif" width="285" height="2" border="0" alt=""></div>
                              <div style="padding: 15px 4px 7px 4px">
                              <center><b>Online Maintenance Request</b></center><br />
                              <br /><br />

      <?php
      $errors 
      null;

      if(isset(
      $_POST['Submit'])){

      $name $_POST['name'];
      $address  $_POST['address'];
      $city    $_POST['city'];
      $state    $_POST['state'];
      $zip    $_POST['zip'];
      $home    $_POST['home'];
      $work    $_POST['work'];
      $mobile    $_POST['mobile'];
      $email    $_POST['email'];
      $request    $_POST['request'];

      $plumbing    $_POST['plumbing'];
      $electrical    $_POST['electrical'];
      $pestcontrol    $_POST['pestcontrol'];
      $appliances    $_POST['appliances'];
      $ac    $_POST['ac'];
      $heater    $_POST['heater'];
      $other    $_POST['other'];


      $mandate=array($name$address$city$state$zip$home$work$mobile$email$request);
      if(empty(
      $name))
      $errors['name']="Please enter your name";
      if(empty(
      $address))
      $errors['address']="Please enter your address";
      if(empty(
      $city))
      $errors['city']="Please enter your city";
      if(empty(
      $state))
      $errors['state']="Please enter your state";
      if(empty(
      $zip))
      $errors['zip']="Please enter your zip code";
      if(empty(
      $home))
      $errors['home']="Please enter your home phone number";
      if(empty(
      $work))
      $errors['work']="Please enter your work phone number";
      if(empty(
      $mobile))
      $errors['mobile']="Please enter your mobile phone number";
      if(empty(
      $email))
      $errors['email']="Please enter your email address";
      if(empty(
      $request))
      $errors['request']="Please enter a description";



      if (
      $_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='')  { 
           echo  
      '<strong>Incorrect verification code. Please <a href="">go back</a> and try again.</strong><br>'
      }
       else {
      if(
      count($errors)==0){

      $myemail  "[email protected]";
      $subject "Online Maintenance Request";
      $message "Hello!

      An online maintenance request has been received from:

      Name: 
      $name
      Address: 
      $address
      City: 
      $city
      State: 
      $state
      Zip: 
      $zip
      Home Phone Number: 
      $home
      Work Phone Number: 
      $work
      Mobile Phone Number: 
      $mobile
      Email Address: 
      $email

      Maintenance Details

      $plumbing
      $electrical
      $pestcontrol
      $appliances
      $ac
      $heater
      $other

      Request:
      $request

      "
      ;

       
      mail($myemail$subject$message);
      echo 
      'We have received your Online Maintenance Request Form and you will be contacted soon.';
      }

      }
      }
      ?>


      <?php 

      if(!isset($_POST['Submit']) || count($errors)){ ?>
      <br />                        
                              <br /><form action="" method="post">

                              <label><font color="#c00000">*</font> Name:</label><input type="text" name="name" value="<?php if (isset($_POST['name'])) echo $_POST['name']; ?>"style="width:150px;" />
      <font color="#C00000"><?php
      if(isset($errors['name'])) echo $errors['name'];
      ?></font><br /><br />
                              <label><font color="#c00000">*</font> Address:</label><input type="text" name="address" value="<?php if (isset($_POST['address'])) echo $_POST['address']; ?>"style="width:150px;" />
      <font color="#C00000"><?php
      if(isset($errors['address'])) echo $errors['address'];
      ?></font><br /><br />
                              <label><font color="#c00000">*</font> City</label><input type="text" name="city" value="<?php if (isset($_POST['city'])) echo $_POST['city']; ?>"style="width:150px;" />
      <font color="#C00000"><?php
      if(isset($errors['city'])) echo $errors['city'];
      ?></font><br /><br />
                              <label><font color="#c00000">*</font> State:</label>
                                      <select name="state"/><?php if (isset($_POST['state'])) echo $_POST['state']; ?>
                                      <option value=""></option>
                                      <option value="alabama">Alabama</option>
                                      <option value="alaska">Alaska</option>
                                      <option value="arizona">Arizona</option>
                                      <option value="arkansas">Arkansas</option>
                                      <option value="california">California</option>
                                      <option value="colorado">Colorado</option>
                                      <option value="connecticut">Connecticut</option>
                                      <option value="delaware">Delaware</option>
                                      <option value="florida">Florida</option>
                                      <option value="georgia">Georgia</option>
                                      <option value="hawaii">Hawaii</option>
                                      <option value="idaho">Idaho</option>
                                      <option value="illinois">Illinois</option>
                                      <option value="indiana">Indiana</option>
                                      <option value="iowa">Iowa</option>
                                      <option value="kansas">Kansas</option>
                                      <option value="kentucky">Kentucky</option>
                                      <option value="louisiana">Louisiana</option>
                                      <option value="maine">Maine</option>
                                      <option value="maryland">Maryland</option>
                                      <option value="massachusetts">Massachusetts</option>
                                      <option value="michigan">Michigan</option>
                                      <option value="minnesota">Minnesota</option>
                                      <option value="mississippi">Mississippi</option>
                                      <option value="missouri">Missouri</option>
                                      <option value="montana">Montana</option>
                                      <option value="nebraska">Nebraska</option>
                                      <option value="nevada">Nevada</option>
                                      <option value="new hampshire">New Hampshire</option>
                                      <option value="new jersey">New Jersey</option>
                                      <option value="new mexico">New Mexico</option>
                                      <option value="new york">New York</option>
                                      <option value="north carolina">North Carolina</option>
                                      <option value="north dakota">North Dakota</option>
                                      <option value="ohio">Ohio</option>
                                      <option value="oklahoma">Oklahoma</option>
                                      <option value="oregon">Oregon</option>
                                      <option value="pennsylvania">Pennsylvania</option>
                                      <option value="rhode island">Rhode Island</option>
                                      <option value="south carolina">South Carolina</option>
                                      <option value="south dakota">South Dakota</option>
                                      <option value="tennessee">Tennessee</option>
                                      <option value="texas">Texas</option>
                                      <option value="utah">Utah</option>
                                      <option value="vermont">Vermont</option>
                                      <option value="virginia">Virginia</option>
                                      <option value="washington">Washington</option>
                                      <option value="west virginia">West Virginia</option>
                                      <option value="wisconsin">Wisconsin</option>
                                      <option value="wyoming">Wyoming</option>
                                      </select>
      <font color="#C00000"><?php
      if(isset($errors['state'])) echo $errors['state'];
      ?></font><br /><br />
                              <label><font color="#c00000">*</font> Zip:</label><input type="text" name="zip" value="<?php if (isset($_POST['zip'])) echo $_POST['zip']; ?>" style="width:100px;" />
      <font color="#C00000"><?php
      if(isset($errors['zip'])) echo $errors['zip'];
      ?></font><br /><br />
                              <label><font color="#c00000">*</font> Home Phone Number:</label><input type="text" name="home" value="<?php if (isset($_POST['home'])) echo $_POST['home']; ?>" style="width:150px;" />
      <font color="#C00000"><?php
      if(isset($errors['home'])) echo $errors['home'];
      ?></font><br /><br />
                              <label><font color="#c00000">*</font> Work Phone Number:</label><input type="text" name="work" value="<?php if (isset($_POST['work'])) echo $_POST['work']; ?>" style="width:150px;" />
      <font color="#C00000"><?php
      if(isset($errors['work'])) echo $errors['work'];
      ?></font><br /><br />
                              <label>Ext.</label><input type="text" name="ext" value="<?php if (isset($_POST['ext'])) echo $_POST['ext']; ?>" style="width:50px;"/><br /><br />
                              <label><font color="#c00000">*</font> Mobile Phone Number:</label><input type="text" name="mobile" value="<?php if (isset($_POST['mobile'])) echo $_POST['mobile']; ?>" style="width:150px;" />
      <font color="#C00000"><?php
      if(isset($errors['mobile'])) echo $errors['mobile'];
      ?></font><br /><br />
                              <label><font color="#c00000">*</font> Email Address:</label><input type="text" name="email" value="<?php if (isset($_POST['email'])) echo $_POST['email']; ?>" style="width:150px;" />
      <font color="#C00000"><?php
      if(isset($errors['email'])) echo $errors['email'];
      ?></font><br /><br /><br />

                              Please specify what kind of maintenance you need:<br />
                              <label>Plumbing</label><input type="checkbox" name="plumbing" value="Plumbing" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                              <label>Electrical</label><input type="checkbox" name="electrical" value="Electrical" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                              <label>Pest Control</label><input type="checkbox" name="pestcontrol" value="Pest Control" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                              <label>Appliances</label><input type="checkbox" name="appliances" value="Appliances" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                              <label>A/C</label><input type="checkbox" name="ac" value="AC" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                              <label>Heater</label><input type="checkbox" name="heater" value="heater" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                              <label>Other</label><input type="checkbox" name="other" value="other" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br /><br />
                              
                              <label><font color="#c00000">*</font> Maintenance Request Description</label><textarea rows="7" cols="10" name="request"><?php if (isset($_POST['request'])) echo $_POST['request']; ?></textarea>
      <font color="#C00000"><?php
      if(isset($errors['request'])) echo $errors['request'];
      ?></font><br /><br />
                              
                              
                              <center><img src="captcha.php"></center><br />
                              <label>Enter code:</label><input type="text" name="vercode" style="width:100px;" /><br /><br /> 
                              <input type="submit" name="Submit" value="Submit" style="width:100px; float:right;" /> 
                                      
                                      
                              </form> 
                              </div></td>
                      </tr>
                  </table>
                  <div style="padding: 12px" class="tbot" align="right">
                               &copy; Copyright 2006-2007. <a href="#" class="tbot"><u>Privacy Policy</u></a>
                  </div>

                  <table border="0" cellpadding="0" cellspacing="0" width="100%">
                         <tr>
                             <td><img src="images/c4.gif" width="2" height="2" border="0" alt=""></td>
                          <td><img src="images/c3.gif" width="2" height="2" border="0" alt=""></td>
                         </tr>
                  </table>
              </td>
          </tr>
      </table>

      </body>
      </html>
      <?php
      }
      ?>
      "Loo loo loo, I've got some apples, loo loo loo, you've got some, too!" - Butters

      Comment


      • #4
        Hello!
        If you are using the CMS than download a module and than properly change the attributes.

        Comment


        • #5
          what is CMS?
          "Loo loo loo, I've got some apples, loo loo loo, you've got some, too!" - Butters

          Comment


          • #6
            I know it's just a simple bracket or closing error...Any help please?
            "Loo loo loo, I've got some apples, loo loo loo, you've got some, too!" - Butters

            Comment


            • #7
              Originally posted by ramboangel11 View Post
              what is CMS?
              Ignore that reply. A CMS is a Content Management System - wordpress for example. It's clear you're not using one.

              First issue I have, is you're checking for the submit button. That shouldn't happen - for one, internet explorer doesn't always send the submit button. I would suggest either putting a hidden input value in to check, or check against a required value to make sure the form has been entered. Or, you could check if $_POST is empty.

              But, in answer to your actual problem, your form displays when submit hasn't been sent (change that like I mentioned above) or there are errors. You need to set a value in the $errors array to register that there was a verification code error. Just now, you're not doing that so the message will echo and the if logic will sum to FALSE because post has been submitted, and it can't find any errors in the $errors array.

              Edit: Noticed that the form is actually in the else portion of your verification check anyway, so that needs to be changed too - changed my code appropriately.

              tl;dr (I hope you did read though haha) do this:
              PHP Code:
              // Change this
              if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='')  { 
                   echo  
              '<strong>Incorrect verification code. Please <a href="">go back</a> and try again.</strong><br>'
              }
               else {
              ...
              }

              // To this
              if(($_POST["vercode"] != $_SESSION["vercode"]) OR (empty($_SESSION["vercode"])))
                  
              $errors['vercode'] = "Wrong validation code.";

              // Then, add echo $errors['vercode']; into the form. 
              Useful function to retrieve difference in times
              The best PHP resource
              A good PHP FAQ
              PLEASE remember to wrap your code in [PHP] tags.
              PHP Code:
              // Replace this
              if(isset($_POST['submitButton']))
              // With this
              if(!empty($_POST))
              // Then check for values/forms. Some IE versions don't send the submit button 
              Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

              Comment


              • #8
                OMG I tried that but i missed the third ) at the end of the first line! bahhhh!

                Thank you so much! I did a happy dance, haha! And yes, I did read what you posted, lol.

                Thanks again!
                "Loo loo loo, I've got some apples, loo loo loo, you've got some, too!" - Butters

                Comment


                • #9
                  You might want to look into the formatting of your code. It's not easy to read.. I've reformatted it for you. Note how easy it is to see opening and closing braces etc:

                  PHP Code:
                  <?php
                  session_start
                  ();
                  ?>
                  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
                  <html>
                  <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                  <title></title>
                  <meta name="description" content="">
                  <meta name="keywords" content="">
                  <link href="style.css" rel="stylesheet" type="text/css">
                  <script>
                  function run_movie(arg)
                     {
                     document.write(arg);
                     } 
                  </script>
                  </head>
                  <body>
                  <table border="0" cellpadding="0" cellspacing="0" align="center">
                      <tr>
                          <td><script type="text/javascript">run_movie('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="739" height="265" id="flash" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#878e9a" /><embed src="flash.swf" quality="high" bgcolor="#878e9a" width="739" height="265" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');</script></td>

                      </tr>
                      <tr>
                          <td width="739" style="background: #494F59">
                              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                     <tr>
                                         <td height="3" valign="top"><img src="images/c1.gif" width="2" height="2" border="0" alt=""></td>
                                      <td align="right" valign="top"><img src="images/c2.gif" width="2" height="2" border="0" alt=""></td>
                                     </tr>
                              </table>

                              <table border="0" cellpadding="0" cellspacing="0" align="center" style="background: url(images/page_bg.gif) repeat-x #5E646F; width: 733px;">
                                  <tr>
                                      <td valign="top" height="358">
                                      <div style="padding: 6px;">
                                          <table border="0" cellpadding="0" cellspacing="0" width="195" style="background: url(images/search_bg.jpg) no-repeat">
                                              <tr>
                                                  <td height="344" valign="top" align="center">
                                                      <table border="0" cellpadding="0" cellspacing="0" width="154">
                                                          <tr>
                                                              <td><div style="padding: 18px 0 5px 5px"><img src="images/text_find_a_home.gif" width="78" height="10" border="0" alt=""></div></td>

                                                          </tr>
                                                          <?php include('nav.txt'?>
                                                          </table>
                                                  </td>
                                              </tr>
                                          </table>
                                      </div></td>
                                      <td><img src="images/spacer.gif" width="14" height="1" border="0" alt=""></td>
                                      <td valign="top" colspan="2" style="padding-right: 7px;">
                                          <div style="padding: 25px 0 5px 4px"><img src="images/" width="280" height="11" border="0" alt="Tenant Services (Current Home Owners)"></div>
                                          <div><img src="images/pix_lbl.gif" width="285" height="2" border="0" alt=""></div>
                                          <div style="padding: 15px 4px 7px 4px">
                                          <center><b>Online Maintenance Request</b></center><br />
                                          <br /><br />

                  <?php
                  $errors 
                  null;

                  if(isset(
                  $_POST['Submit']))
                     {
                     
                  $name $_POST['name'];
                     
                  $address  $_POST['address'];
                     
                  $city    $_POST['city'];
                     
                  $state    $_POST['state'];
                     
                  $zip    $_POST['zip'];
                     
                  $home    $_POST['home'];
                     
                  $work    $_POST['work'];
                     
                  $mobile    $_POST['mobile'];
                     
                  $email    $_POST['email'];
                     
                  $request    $_POST['request'];

                     
                  $plumbing    $_POST['plumbing'];
                     
                  $electrical    $_POST['electrical'];
                     
                  $pestcontrol    $_POST['pestcontrol'];
                     
                  $appliances    $_POST['appliances'];
                     
                  $ac    $_POST['ac'];
                     
                  $heater    $_POST['heater'];
                     
                  $other    $_POST['other'];


                     
                  $mandate=array($name$address$city$state$zip$home$work$mobile$email$request);
                     if(empty(
                  $name))
                        
                  $errors['name']="Please enter your name";
                     if(empty(
                  $address))
                        
                  $errors['address']="Please enter your address";
                     if(empty(
                  $city))
                        
                  $errors['city']="Please enter your city";
                     if(empty(
                  $state))
                        
                  $errors['state']="Please enter your state";
                     if(empty(
                  $zip))
                        
                  $errors['zip']="Please enter your zip code";
                     if(empty(
                  $home))
                        
                  $errors['home']="Please enter your home phone number";
                     if(empty(
                  $work))
                        
                  $errors['work']="Please enter your work phone number";
                     if(empty(
                  $mobile))
                        
                  $errors['mobile']="Please enter your mobile phone number";
                     if(empty(
                  $email))
                        
                  $errors['email']="Please enter your email address";
                     if(empty(
                  $request))
                        
                  $errors['request']="Please enter a description";

                     if (
                  $_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='')
                        { 
                        echo  
                  '<strong>Incorrect verification code. Please <a href="">go back</a> and try again.</strong><br>'
                        }
                     else
                        {
                        if(
                  count($errors)==0)
                           {
                           
                  $myemail  "[email protected]";
                           
                  $subject "Online Maintenance Request";
                           
                  $message "Hello!

                           An online maintenance request has been received from:

                           Name: 
                  $name
                           Address: 
                  $address
                           City: 
                  $city
                           State: 
                  $state
                           Zip: 
                  $zip
                           Home Phone Number: 
                  $home
                           Work Phone Number: 
                  $work
                           Mobile Phone Number: 
                  $mobile
                           Email Address: 
                  $email

                           Maintenance Details

                           
                  $plumbing
                           
                  $electrical
                           
                  $pestcontrol
                           
                  $appliances
                           
                  $ac
                           
                  $heater
                           
                  $other

                           Request:
                  $request

                           "
                  ;

                            
                           
                  mail($myemail$subject$message);
                           echo 
                  'We have received your Online Maintenance Request Form and you will be contacted soon.';
                           }
                        }
                     }

                  if(!isset(
                  $_POST['Submit']) || count($errors))
                     { 
                  ?>
                  <br />                        
                                          <br /><form action="" method="post">

                                          <label><font color="#c00000">*</font> Name:</label><input type="text" name="name" value="<?php if (isset($_POST['name'])) echo $_POST['name']; ?>"style="width:150px;" />
                  <font color="#C00000"><?php
                  if(isset($errors['name'])) echo $errors['name'];
                  ?></font><br /><br />
                                          <label><font color="#c00000">*</font> Address:</label><input type="text" name="address" value="<?php if (isset($_POST['address'])) echo $_POST['address']; ?>"style="width:150px;" />
                  <font color="#C00000"><?php
                  if(isset($errors['address'])) echo $errors['address'];
                  ?></font><br /><br />
                                          <label><font color="#c00000">*</font> City</label><input type="text" name="city" value="<?php if (isset($_POST['city'])) echo $_POST['city']; ?>"style="width:150px;" />
                  <font color="#C00000"><?php
                  if(isset($errors['city'])) echo $errors['city'];
                  ?></font><br /><br />
                                          <label><font color="#c00000">*</font> State:</label>
                                                  <select name="state"/><?php if (isset($_POST['state'])) echo $_POST['state']; ?>
                                                  <option value=""></option>
                                                  <option value="alabama">Alabama</option>
                                                  <option value="alaska">Alaska</option>
                                                  <option value="arizona">Arizona</option>
                                                  <option value="arkansas">Arkansas</option>
                                                  <option value="california">California</option>
                                                  <option value="colorado">Colorado</option>
                                                  <option value="connecticut">Connecticut</option>
                                                  <option value="delaware">Delaware</option>
                                                  <option value="florida">Florida</option>
                                                  <option value="georgia">Georgia</option>
                                                  <option value="hawaii">Hawaii</option>
                                                  <option value="idaho">Idaho</option>
                                                  <option value="illinois">Illinois</option>
                                                  <option value="indiana">Indiana</option>
                                                  <option value="iowa">Iowa</option>
                                                  <option value="kansas">Kansas</option>
                                                  <option value="kentucky">Kentucky</option>
                                                  <option value="louisiana">Louisiana</option>
                                                  <option value="maine">Maine</option>
                                                  <option value="maryland">Maryland</option>
                                                  <option value="massachusetts">Massachusetts</option>
                                                  <option value="michigan">Michigan</option>
                                                  <option value="minnesota">Minnesota</option>
                                                  <option value="mississippi">Mississippi</option>
                                                  <option value="missouri">Missouri</option>
                                                  <option value="montana">Montana</option>
                                                  <option value="nebraska">Nebraska</option>
                                                  <option value="nevada">Nevada</option>
                                                  <option value="new hampshire">New Hampshire</option>
                                                  <option value="new jersey">New Jersey</option>
                                                  <option value="new mexico">New Mexico</option>
                                                  <option value="new york">New York</option>
                                                  <option value="north carolina">North Carolina</option>
                                                  <option value="north dakota">North Dakota</option>
                                                  <option value="ohio">Ohio</option>
                                                  <option value="oklahoma">Oklahoma</option>
                                                  <option value="oregon">Oregon</option>
                                                  <option value="pennsylvania">Pennsylvania</option>
                                                  <option value="rhode island">Rhode Island</option>
                                                  <option value="south carolina">South Carolina</option>
                                                  <option value="south dakota">South Dakota</option>
                                                  <option value="tennessee">Tennessee</option>
                                                  <option value="texas">Texas</option>
                                                  <option value="utah">Utah</option>
                                                  <option value="vermont">Vermont</option>
                                                  <option value="virginia">Virginia</option>
                                                  <option value="washington">Washington</option>
                                                  <option value="west virginia">West Virginia</option>
                                                  <option value="wisconsin">Wisconsin</option>
                                                  <option value="wyoming">Wyoming</option>
                                                  </select>
                  <font color="#C00000"><?php
                  if(isset($errors['state'])) echo $errors['state'];
                  ?></font><br /><br />
                                          <label><font color="#c00000">*</font> Zip:</label><input type="text" name="zip" value="<?php if (isset($_POST['zip'])) echo $_POST['zip']; ?>" style="width:100px;" />
                  <font color="#C00000"><?php
                  if(isset($errors['zip'])) echo $errors['zip'];
                  ?></font><br /><br />
                                          <label><font color="#c00000">*</font> Home Phone Number:</label><input type="text" name="home" value="<?php if (isset($_POST['home'])) echo $_POST['home']; ?>" style="width:150px;" />
                  <font color="#C00000"><?php
                  if(isset($errors['home'])) echo $errors['home'];
                  ?></font><br /><br />
                                          <label><font color="#c00000">*</font> Work Phone Number:</label><input type="text" name="work" value="<?php if (isset($_POST['work'])) echo $_POST['work']; ?>" style="width:150px;" />
                  <font color="#C00000"><?php
                  if(isset($errors['work'])) echo $errors['work'];
                  ?></font><br /><br />
                                          <label>Ext.</label><input type="text" name="ext" value="<?php if (isset($_POST['ext'])) echo $_POST['ext']; ?>" style="width:50px;"/><br /><br />
                                          <label><font color="#c00000">*</font> Mobile Phone Number:</label><input type="text" name="mobile" value="<?php if (isset($_POST['mobile'])) echo $_POST['mobile']; ?>" style="width:150px;" />
                  <font color="#C00000"><?php
                  if(isset($errors['mobile'])) echo $errors['mobile'];
                  ?></font><br /><br />
                                          <label><font color="#c00000">*</font> Email Address:</label><input type="text" name="email" value="<?php if (isset($_POST['email'])) echo $_POST['email']; ?>" style="width:150px;" />
                  <font color="#C00000"><?php
                  if(isset($errors['email'])) echo $errors['email'];
                  ?></font><br /><br /><br />

                                          Please specify what kind of maintenance you need:<br />
                                          <label>Plumbing</label><input type="checkbox" name="plumbing" value="Plumbing" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                                          <label>Electrical</label><input type="checkbox" name="electrical" value="Electrical" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                                          <label>Pest Control</label><input type="checkbox" name="pestcontrol" value="Pest Control" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                                          <label>Appliances</label><input type="checkbox" name="appliances" value="Appliances" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                                          <label>A/C</label><input type="checkbox" name="ac" value="AC" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                                          <label>Heater</label><input type="checkbox" name="heater" value="heater" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br />
                                          <label>Other</label><input type="checkbox" name="other" value="other" style="position:absolute; margin-left:45px;background:transparent;border:0px;" /><br /><br />
                                          
                                          <label><font color="#c00000">*</font> Maintenance Request Description</label><textarea rows="7" cols="10" name="request"><?php if (isset($_POST['request'])) echo $_POST['request']; ?></textarea>
                  <font color="#C00000"><?php
                  if(isset($errors['request'])) echo $errors['request'];
                  ?></font><br /><br />
                                          
                                          
                                          <center><img src="captcha.php"></center><br />
                                          <label>Enter code:</label><input type="text" name="vercode" style="width:100px;" /><br /><br /> 
                                          <input type="submit" name="Submit" value="Submit" style="width:100px; float:right;" /> 
                                                  
                                                  
                                          </form> 
                                          </div></td>
                                  </tr>
                              </table>
                              <div style="padding: 12px" class="tbot" align="right">
                                           &copy; Copyright 2006-2007. <a href="#" class="tbot"><u>Privacy Policy</u></a>
                              </div>

                              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                     <tr>
                                         <td><img src="images/c4.gif" width="2" height="2" border="0" alt=""></td>
                                      <td><img src="images/c3.gif" width="2" height="2" border="0" alt=""></td>
                                     </tr>
                              </table>
                          </td>
                      </tr>
                  </table>

                  </body>
                  </html>
                  <?php
                     
                  }
                  ?>
                  "Tango says double quotes with a single ( ' ) quote in the middle"
                  '$Name says single quotes with a double ( " ) quote in the middle'
                  "Tango says double quotes ( \" ) must escape a double quote"
                  '$Name single quotes ( \' ) must escape a single quote'

                  Comment

                  Working...
                  X