

Note: YOUR CONTACT FORM PAGE MUST BE SAVED WITH A " .php " EXTENTION



Step 1:

Open your contact page in a plain text or code editing package.
At the very very very top of the page paste the following code:

----------------------
Start copying below the dashed lines
----------------------



<?php session_start(); ?>



----------------------
End copying above the dotted lines:
----------------------




Step 2:

Copy and paste the following code into your contact page's <body> section:

----------------------
Start copying below the dashed lines
----------------------

    <form action="/contactking/contactking.php" method="post">
      <table width="362" border="0" cellpadding="5" cellspacing="0">
        <tr>
          <td width="170" align="left" valign="middle"><p class="contactform"><strong>Name: *</strong><br />
              <span style="color:#F00"><?php echo $_SESSION['nameerror'] ?></span><br />
              <input name="name" type="text" id="name" value="<?php echo $_SESSION['name'] ?>" maxlength="60"/>
            </p></td>
          <td width="260" align="left" valign="middle"><p class="contactform"><strong>Email: *</strong><br />
              <span style="color:#F00"><?php echo $_SESSION['emailerror'] ?></span><br />
              <input name="email" type="text" id="email" value="<?php echo $_SESSION['email'] ?>" maxlength="100" />
            </p></td>
        </tr>
        <tr>
          <td align="left" valign="middle"><p class="contactform"><strong>Phone Number:</strong><br />
              <input name="tel" type="text" id="tel" value="<?php echo $_SESSION['tel'] ?>" maxlength="20" />
            </p></td>
          <td align="left" valign="middle"><strong>Call Back:</strong>
            <label><br />
              <input border="0" type="radio" name="callback" value="Yes" id="callback_0" />
              Yes</label>
            <label>
              <input name="callback" type="radio" id="callback_1" value="No" checked="checked" border="0" />
              No</label></td>
        </tr>
        <tr>
          <td colspan="2" align="left" valign="middle"><p class="contactform"><strong>Subject: *<br />
              </strong><span style="color:#F00"><?php echo $_SESSION['subjecterror'] ?></span><br />
              <input name="subject" type="text" id="subject" value="<?php echo $_SESSION['subject'] ?>" maxlength="150"/>
            </p></td>
        </tr>
        <tr>
          <td colspan="2" align="left" valign="middle"><p class="contactform"><strong>Comments: *</strong><br />
              <span style="color:#F00"><?php echo $_SESSION['messageerror'] ?></span><br />
              <textarea name="message" cols="40" rows="13" id="message"><?php echo $_SESSION['message'] ?></textarea>
            </p></td>
        </tr>
        <tr>
          <td colspan="2" align="left" valign="middle"><p class="contactform"><strong>Anti Spam: *</strong><br />
              Are you human?
              <select name="humancheck" id="humancheck">
                <option value="---">---</option>
                <option value="no">No</option>
                <option value="yes">Yes</option>
              </select>
              <span style="color:#F00"><?php echo $_SESSION['humanerror'] ?></span> <strong><u><br />
              <br />
              Why am i being asked this?</u></strong><br />
              This is a security measure to avoid spam bots that <br />
              crawl the internet from abusing the contact form.</p></td>
        </tr>
        <tr>
          <td colspan="2" align="left" valign="middle"><input class="btn" type="submit" name="button" id="button" value="Send" />
            <span style="color:#F00"><?php echo $_SESSION['senderror'] ?></span><br /></td>
        </tr>
      </table>
    </form>   
      
      
----------------------
End copying above the dotted lines:
----------------------
    
    
      
Step 3: Open "config.php" and edit in your code editor and change the settings accordingly.



Step 4: Upload the /contactking folder to your server's root directory.



Step 5: Navigate to your contact page and test the system works correctly.



Enjoy the form - 

creativeben.co.uk