Jump to content

Getting PHP Script to read any type of formmail being sent to email address.


The Don

Recommended Posts

How do you write a php script for any type of form that's being sent to owner's email address?

The basics is mailto:yourname@mail.com but instead it's contact.php which reads the info in the form.

 

How do you write a php script with all the given info?  :-\

Link to comment
Share on other sites

Can anyone give a formail script example for this form? This form is going to an email address, how will the php script be written?

 

<form action="contact.php" method="post" name="quote" id="quote">

    <label>Company Name

    <input name="Company Name" type="text" id="Company Name">

    </label>

    <label>Fax

    <input name="Fax" type="text" id="Fax">

    </label>

    <p>

      <label>Contact Name*

      <input name="Contact Name" type="text" id="Contact Name" onBlur="MM_validateForm('Company Name','','R','Size per panel (H x W)','','H x W');return document.MM_returnValue">

      </label>

      <label>Email*

      <input name="Email" type="text" id="Email" onBlur="MM_validateForm('Email','','RisEmail','Size per panel (H x W)','','H x W');return document.MM_returnValue">

      </label>

    </p>

    <p>

      <label>Phone*

      <input name="Phone Number" type="text" id="Phone Number" onBlur="MM_validateForm('Phone Number','','R','Size per panel (H x W)','','H x W');return document.MM_returnValue">

      </label>

      <label>Estimate Needed By

      <input name="Estimate Needed By" type="text" id="Estimate Needed By" size="20">

      </label>

    </p>

    <p><strong>Items</strong></p>

    <p>

      <label>Item Description:

      <select name="Item Description" id="Item Description">

        <option selected>Please Select</option>

        <option value="Main Act Curtain">Main Act Curtain</option>

        <option value="Main Valance">Main Valance</option>

        <option value="Traveler Curtain">Traveler Curtain</option>

        <option value="Leg">Leg</option>

        <option value="Border">Border</option>

        <option value="Muslin Cyc">Muslin Cyc</option>

        <option value="Scrim Backdrop">Scrim Backdrop</option>

        <option>Other</option>

      </select>

      </label>

      <label>Fabric:

      <select name="Fabric" id="Fabric">

        <option selected>Please Select</option>

        <option value="25oz. FR Velour">25oz. FR Velour</option>

        <option value="21oz. FR Velour">21oz. FR Velour</option>

        <option value="16oz. FR Velour">16oz. FR Velour</option>

        <option value="25oz. IFR Velour">25oz. IFR Velour</option>

        <option value="13oz. IFR Velour">13oz. IFR Velour</option>

        <option value="IFR Chevron">IFR Chevron</option>

        <option value="FR Nassau Chevron">FR Nassau Chevron</option>

        <option value="FR Atlas Oxford">FR Atlas Oxford</option>

        <option value="Doral Opaque">Doral Opaque</option>

        <option value="Nevada">Nevada</option>

        <option value="Commando 12oz.">Commando 12oz.</option>

        <option value="Commando 16oz.">Commando 16oz.</option>

        <option value="NFR Muslin">NFR Muslin</option>

        <option value="FR Muslin">FR Muslin</option>

        <option value="Scrim">Scrim</option>

        <option value="Leno (filled scrim)">Leno (filled scrim)</option>

        <option>Other (please specify)</option>

      </select>

      </label>

    </p>

    <p>Fullness

      <select name="Fullness" id="Fullness">

        <option selected>Please Select</option>

        <option value="Flat">Flat</option>

        <option value="+50%">+50%</option>

        <option value="+75%">+75%</option>

        <option value="+100%">+100%</option>

      </select>

    Finish

    <select name="Finish" id="Finish">

      <option selected>Please Select</option>

      <option value="Web/Grom/Ties and Hem">Web/Grom/Ties and Hem</option>

      <option value="Web/Grom/Ties and Pipe Pocket">Web/Grom/Ties and Pipe Pocket</option>

      <option value="Web/Grom/Ties and Weights">Web/Grom/Ties and Weights</option>

      <option>Other (please specify)</option>

    </select>

    </p>

    <p>

      <label>Color

      <input name="Selected Color" type="text" id="Selected Color">

      </label>

    Lining

    <label>

    <input name="Lining" type="radio" value="Yes">

    Yes</label>

    <label>

    <input name="Lining" type="radio" value="No">

    No</label>

    </p>

    <p>

      <label>Size per panel (H x W)

      <input name="Size per panel (H x W)" type="text" id="Size per panel (H x W)" size="18">

      </label>

      <label>Quantity:

      <input name="Qty" type="text" id="Qty" size="12">

      </label>

    </p>

    <p>Do you require track or other hardware for the items listed above? Please describe</p>

    <p>

      <label>

      <textarea name="Do you require track or other hardware for the items listed above? Please describe" cols="25" rows="3" id="Do you require track or other hardware for the items listed above? Please describe"></textarea>

      </label>

</p>

    <p>Please enter any additional comments.

      <label>

      <textarea name="Additional Comments:" cols="25" rows="3" id="Additional Comments:"></textarea>

      </label>

    </p>

    <p>

      <input name="Add Item" type="reset" id="Add Item" value="Add item">

      <input type="submit" name="Submit" value="Submit">

    </p>

  </form>

Link to comment
Share on other sites

Can anyone give a formail script example for this form? This form is going to an email address, how will the php script be written?

 

<form action="contact.php" method="post" name="quote" id="quote">

    <label>Company Name

    <input name="Company Name" type="text" id="Company Name">

    </label>

    <label>Fax

    <input name="Fax" type="text" id="Fax">

    </label>

    <p>

      <label>Contact Name*

      <input name="Contact Name" type="text" id="Contact Name" onBlur="MM_validateForm('Company Name','','R','Size per panel (H x W)','','H x W');return document.MM_returnValue">

      </label>

      <label>Email*

      <input name="Email" type="text" id="Email" onBlur="MM_validateForm('Email','','RisEmail','Size per panel (H x W)','','H x W');return document.MM_returnValue">

      </label>

    </p>

    <p>

      <label>Phone*

      <input name="Phone Number" type="text" id="Phone Number" onBlur="MM_validateForm('Phone Number','','R','Size per panel (H x W)','','H x W');return document.MM_returnValue">

      </label>

      <label>Estimate Needed By

      <input name="Estimate Needed By" type="text" id="Estimate Needed By" size="20">

      </label>

    </p>

    <p><strong>Items</strong></p>

    <p>

      <label>Item Description:

      <select name="Item Description" id="Item Description">

        <option selected>Please Select</option>

        <option value="Main Act Curtain">Main Act Curtain</option>

        <option value="Main Valance">Main Valance</option>

        <option value="Traveler Curtain">Traveler Curtain</option>

        <option value="Leg">Leg</option>

        <option value="Border">Border</option>

        <option value="Muslin Cyc">Muslin Cyc</option>

        <option value="Scrim Backdrop">Scrim Backdrop</option>

        <option>Other</option>

      </select>

      </label>

      <label>Fabric:

      <select name="Fabric" id="Fabric">

        <option selected>Please Select</option>

        <option value="25oz. FR Velour">25oz. FR Velour</option>

        <option value="21oz. FR Velour">21oz. FR Velour</option>

        <option value="16oz. FR Velour">16oz. FR Velour</option>

        <option value="25oz. IFR Velour">25oz. IFR Velour</option>

        <option value="13oz. IFR Velour">13oz. IFR Velour</option>

        <option value="IFR Chevron">IFR Chevron</option>

        <option value="FR Nassau Chevron">FR Nassau Chevron</option>

        <option value="FR Atlas Oxford">FR Atlas Oxford</option>

        <option value="Doral Opaque">Doral Opaque</option>

        <option value="Nevada">Nevada</option>

        <option value="Commando 12oz.">Commando 12oz.</option>

        <option value="Commando 16oz.">Commando 16oz.</option>

        <option value="NFR Muslin">NFR Muslin</option>

        <option value="FR Muslin">FR Muslin</option>

        <option value="Scrim">Scrim</option>

        <option value="Leno (filled scrim)">Leno (filled scrim)</option>

        <option>Other (please specify)</option>

      </select>

      </label>

    </p>

    <p>Fullness

      <select name="Fullness" id="Fullness">

        <option selected>Please Select</option>

        <option value="Flat">Flat</option>

        <option value="+50%">+50%</option>

        <option value="+75%">+75%</option>

        <option value="+100%">+100%</option>

      </select>

    Finish

    <select name="Finish" id="Finish">

      <option selected>Please Select</option>

      <option value="Web/Grom/Ties and Hem">Web/Grom/Ties and Hem</option>

      <option value="Web/Grom/Ties and Pipe Pocket">Web/Grom/Ties and Pipe Pocket</option>

      <option value="Web/Grom/Ties and Weights">Web/Grom/Ties and Weights</option>

      <option>Other (please specify)</option>

    </select>

    </p>

    <p>

      <label>Color

      <input name="Selected Color" type="text" id="Selected Color">

      </label>

    Lining

    <label>

    <input name="Lining" type="radio" value="Yes">

    Yes</label>

    <label>

    <input name="Lining" type="radio" value="No">

    No</label>

    </p>

    <p>

      <label>Size per panel (H x W)

      <input name="Size per panel (H x W)" type="text" id="Size per panel (H x W)" size="18">

      </label>

      <label>Quantity:

      <input name="Qty" type="text" id="Qty" size="12">

      </label>

    </p>

    <p>Do you require track or other hardware for the items listed above? Please describe</p>

    <p>

      <label>

      <textarea name="Do you require track or other hardware for the items listed above? Please describe" cols="25" rows="3" id="Do you require track or other hardware for the items listed above? Please describe"></textarea>

      </label>

</p>

    <p>Please enter any additional comments.

      <label>

      <textarea name="Additional Comments:" cols="25" rows="3" id="Additional Comments:"></textarea>

      </label>

    </p>

    <p>

      <input name="Add Item" type="reset" id="Add Item" value="Add item">

      <input type="submit" name="Submit" value="Submit">

    </p>

  </form>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.