PHP form handler

Hi,
I've found a PHP form handler in one of the forums to process my feedback page. All works well but one thing I can't work out is when a visitor to the site fills in the info and clicks the submit button, that comes back to my mail box as expected but if I want to reply to this email the site's email address always comes up in the "To" field rather than the viewer's email address, is there anyway to change this?  I've trawled the forums but can't find an answer, have included the php code if anyone has any suggestions.
Thanks in advance.
<?php
if (!empty($HTTP_GET_VARS)) while(list($name, $value) =
each($HTTP_GET_VARS)) $$name = $value;
if (!empty($HTTP_POST_VARS)) while(list($name, $value) =
each($HTTP_POST_VARS)) $$name = $value;
$contact_msg="Dear $contact,
Thank you for taking the time to contact My Comany via our web site.
Your request has been received and will contact you ASAP.
Regards
My Company
http://www.mycompany.co.nz
mailto:[email protected]
mail("$eMail","Contact Form","$contact_msg","From: My Company <[email protected]>");
$contact_copy="
------------ My Company request information form --------------
The following person has filled out the contact form:
-- CUSTOMER DETAILS
First Name: $contact
Last Name address: $lastName
Company: $company_Name
Phone Number: $phone_Number
email: $eMail
Questions: $questions
-- !END OF FORM --------------------------------------------
mail("[email protected]","Contact Form","$contact_copy","From: My Company <[email protected]>");
?>

Thanks for posting this useful information. I found some more at php tutorial.

Similar Messages

  • Sending DateField to PHP form handler

    I'm having trouble finding a tuturial on sending the variable
    created by the DateField component to a PHP form. Any help
    appreciated.
    Thanks,
    ziggy

    Thanks for posting this useful information. I found some more at php tutorial.

  • Php form and mail handling

    I am trying to create a php form and I can get it to spit out the information from the form but I cannot seem to get it to send the result as an email.
    This is probably something really simple and I am totally missing it.
    Here is the form:
    <form method="post" action="sendail.php">               
      <?php
    $ipi = getenv("REMOTE_ADDR");
    $httprefi = getenv ("HTTP_REFERER");
    $httpagenti = getenv ("HTTP_USER_AGENT");
    ?>
      <input type="hidden" name="ip" value="<?php echo $ipi ?>" />
      <input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
      <input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
            <p>I need:<span class="redStar">*</span>
              <input type= "radio" name = "need" value = "service" />service.
            <input type= "radio" name = "need" value = "sales" />to contact a salesperson.
            <input type= "radio" name = "need" value = "literature" />to have literature sent to me.<br />
            Name:        <input type = "text" name = "name" size = "30" />
            <span class="redStar">*</span><br />
            Title:           <input type = "text" name = "title" size = "30" /><br />
            Company: <input type = "text" name = "company" size = "30" /></p>
            <p>Address 1: <input type = "text" name = "address1" size = "30" />
              <span class="redStar">*</span><br />
            Address 2: <input type = "text" name = "address2" size = "30" /><br />
            City: <input type = "text" name = "city" size = "30" />
            <span class="redStar">*</span> State: <input type = "text" name = "state" size = "3" />
            <span class="redStar">*</span> Zip: <input type = "text" name = "zip" size = "11" />
            <span class="redStar">*</span></p>
           <p>Email:   <input type = "text" name = "email" size = "30" />
             <span class="redStar">*</span><br />
            Phone: <input type = "text" name = "phone" size = "30" />
            <span class="redStar">*</span> </p>
            <p><input type = "submit" name = "submit" value = "Submit" /></p>
            <p><span class="redStar">*</span> These blanks must be filled in</p>
    </form>       
    and here is the page that handles the form (with the exception of the referring page, and other environmentals:
            <?php
            $ip = $_POST['ip'];
    $httpref = $_POST['httpref'];
    $httpagent = $_POST['httpagent'];
            $need = $_POST['need'];
            $name = $_POST['name'];
            $title = $_POST['title'];
            $company = $_POST['company'];
            $address1 = $_POST['address1'];
            $address2 = $_POST['address2'];
            $city = $_POST['city'];
            $state = $_POST['state'];
            $zip = $_POST['zip'];
            $email = $_POST['email'];
            $phone = $_POST['phone'];
    if(!$email == "" && (!strstr($email,"@") || !strstr($email,".")))
    echo "<h2>Use Back - Enter valid email</h2>\n";
    $badinput = "<h2>Your form was NOT submitted</h2>\n";
    echo $badinput;
    die ("Go back! ! ");
    if(empty($name) || empty($email) || empty($address1) || empty($city) || empty($state) || empty($zip) || empty($phone)) {
    echo "<h2>Use your Back button - fill in all starred fields, your form was not submitted.</h2>\n";
    die ("Use back! ! ");
    $todayis = date("l, F j, Y, g:i a") ;
    $subject = Contact_From_Website;
    $message = " $todayis [EST] \n
    From: $name ($email)\n
    Title: $title\n
    Company: $company\n
    Telephone: $phone ($phone)\n
    Address: $address1\n
    $address2\n
    City: $city\n
    State: $state\n
    Zip: $zip\n
    Phone: $phone\n
    Additional Info : IP = $ip \n
    Browser Info: $httpagent \n
    Referral : $httpref \n
    $from = "From: $email\r\n";
    mail("[email protected]", $name, $title, $company, $phone, $address1, $address2, $city, $state, $zip, $email, $phone, $ip, $httpref);
    /* This is the part that emails everyone and is commented out for testing
    if ($need = "service") {
        mail("[email protected]", $name, $title, $company, $phone, $address1, $address2, $city, $state, $zip, $email, $phone, $ip, $httpref);
    mail("[email protected]", $need, $name, $title, $company, $phone, $address1, $address2, $city, $state, $zip, $email, $phone, $ip, $httpref);
        if ($need = "sales") {
        mail("[email protected]", $need, $name, $title, $company, $phone, $address1, $address2, $city, $state, $zip, $email, $phone, $ip, $httpref);
            mail("[email protected]", $need, $name, $title, $company, $phone, $address1, $address2, $city, $state, $zip, $email, $phone, $ip, $httpref);
        if ($need = "literature") {
            mail("[email protected]", $need, $name, $title, $company, $phone, $address1, $address2, $city, $state, $zip, $email, $phone, $ip, $httpref);
    mail("[email protected]", $need, $name, $title, $company, $phone, $address1, $address2, $city, $state, $zip, $email, $phone, $ip, $httpref);
            ?>
            Date: <?php echo $todayis ?>
    <br />
    Thank You : <?php echo $name ?> ( <?php echo $email ?> )  <?php echo $title ?> <?php echo $company ?> <?php echo $phone ?> <?php echo $address1 ?> <?php echo $address2 ?> <?php echo $city ?> <?php echo $state ?> <?php echo $zip ?>
    <br /> You have requested <?php echo $need ?>
    <br /> Your IP Address has been recorded for your safety.
    <?php echo $ip ?>
    You can see where I am trying to go with this. I want to use the $need variable to determine where the email is going to go (two people in each case). But I am testing this script and cannot get to send me an email without any if statements.
    Where have I gone wrong?

    60251977 wrote:
    > I'm considering switching to Wordpress but have started
    building a site in
    > Dreamweaver, and am not especially keen on having to
    learn an entirely new
    > program.
    If you're not keen on learning, you might want to reconsider
    your plans.
    Creating a simple web page is easy, giving many beginners the
    false
    impression that website development is something anyone can
    do without
    acquiring specialist knowledge.
    > I want to create a simple "Add Comment" form so that
    when a visitor to my site
    > wants to comment, he can do so, press submit, and the
    page refreshes with his
    > comments inserted. Just like a blog.
    Yep, sounds simple enough, but so is turning the ignition key
    of a car.
    What you're ignoring is the underlying technology that not
    only makes it
    work, but makes it work safely. WordPress does all of this
    for you
    straight out of the box. To build it successfully in
    Dreamweaver
    requires a knowledge of PHP, MySQL, and SQL.
    > According to the Pickaweb FAQ, the path to PHP is
    "/usr/bin/php"
    If PHP is enabled on your site, the path to PHP is
    irrelevant.
    > If my site was called elephantlike.co.uk, what would I
    enter into the Action
    > field of the form wizard?
    > Would this make my form work? Or is there other stuff I
    need to know?
    What you enter in the Action field is the path to the script
    that
    processes the form input. If you're willing to learn the
    basics of PHP,
    MySQL, and SQL, you can create a comment form on your site
    with
    Dreamweaver. However, you need to be aware of security
    issues, such as
    cross-site scripting and dealing with spam. What looks simple
    at first
    glance is actually more complex. It's not rocket science, but
    it does
    involve a learning curve.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • Why can I not create a PHP Form Variable binding in Dreamweaver CS6?

    I'm using Dreamweaver CS6 on Windows 7.
    Currently, I'm following along with Lynda.com tutorial:
    Dreamweaver with PHP and MySQL: Ch. 6. Building Data Entry Forms |  Handling form submissions with PHP
    I'm attempting to add a form variable binding to a PHP document, but after each time I open the menu, type in my name and press OK, it does not show up in my Bindings box.
    and then POOF:
    Can anyone tell me what I'm doing wrong here? Or what I haven't done yet?
    I haven't had a problem with the entire tutorial up until this point and I couldn't find any documentation anywhere else on how to fix my problem.

    I'm using Dreamweaver CS6 on Windows 7.
    Currently, I'm following along with Lynda.com tutorial:
    Dreamweaver with PHP and MySQL: Ch. 6. Building Data Entry Forms |  Handling form submissions with PHP
    I'm attempting to add a form variable binding to a PHP document, but after each time I open the menu, type in my name and press OK, it does not show up in my Bindings box.
    and then POOF:
    Can anyone tell me what I'm doing wrong here? Or what I haven't done yet?
    I haven't had a problem with the entire tutorial up until this point and I couldn't find any documentation anywhere else on how to fix my problem.

  • Need help with PHP form processor coding

    I posted my first question on this forum earlier today and got help quickly. I'm going to try again and see who can help me this time.
    I have a customer feedback form that I designed and I am using Spry validation on the fields and I'm use Recaptcha as well. Now I'm trying to get the form handler working. I know there are some canned procedures out there but I hate using too much code that I don't understand at all.  I'm sure my first attempt at PHP coding is horrible but we all have to learn. My processor is working in some areas but there are holes I don't know how to fill in:
    1. When I validate the Recaptcha input, if it was entered correctly, I go on to send an email to the appropriate person BUT how do I send them a message and get back to the form if the recaptcha validation fails and still have their entries in place?
    2. Assuming the recaptcha validated correctly, my procedure sends an email  and it writes the comments to a file for historical purposes. These parts seem to be working (by some miracle). Once I do this, I think I would like to open a little window to send the customer a confirmation message, have them click the box to confirm and close the window and then take them back to the feedback form but now have it be reset. I'm not sure how to do these steps.
    Does anyone have a SIMPLE example to accomplish these steps?
    Thanks much!!
    Donna

    It would be hard to give you substantive examples of how to accomplish your goals here without seeing your PHP code, but in general the following methods would work:
    1.  To return to the form with the fields populated, is easiest when the processing script and the form code are on the same page.  The idea is that when the form is not properly completed, you fall back into the form code and use the data from the posted values to repopulate the fields, e.g.,
    <input type="text' name="whatever" value="<?php isset($_POST['whatever']) { echo $_POST['whatever']; ?>">
    or
    <select name="whatever2">
    <option<?php if(isset($_POST['whatever2']) && $_POST['whatever2']=='this_option_value') { echo ' selected="selected"'; } ?>>this_option_value</option>
    </select>
    Each field is set to repeat the posted data (if the corresponding $_POST value is set - to avoid error messages when the page is first loaded).
    2.  You can place the confirmation message on the page with CSS that hides it.  When the form is submitted successfully, just set a variable that is used to show the previously hidden message, e.g.,
    Assume the following CSS -
    #message { display:none; }
    and the following HTML -
    <p id="message">Congratulations</p>
    and the fact that you have set a PHP variable called $success to be true when the form is successfully submitted, you would just modify the HTML like this -
    <p id="message"<?php if($success) { echo ' style="display:block"; } ?>>Congratulations</p>
    Make sense?

  • Php form to osx address book

    anyone know if a php form can be developed to send information directly into address book?
    i'd like to develop my fanbase through my music website and this would really be perfect.
    Ibook G4   Mac OS X (10.4.6)  

    Seems that you could, using more than PHP by itself however.
    Perhaps a combination of forms and Automator task(s)/AppleScript could accomplish the task for you.
    In PHP, you can write out files, so it is assumed that you can write a file that will be handled by the Automator/AppleScript portion to accomplish the creation of Address Book records.
    Beavis2084

  • Php form mailer/Flash help

    I have a php form that I am using with my Flash file. It
    works great so far, but I would like to get confirmation from the
    php in the Flash file, that the info has really been sent. I think
    it is already sent up in the php, but I don't know how to handle it
    in my Flash file. The php file is attached. Do I use the echo? How
    would I do that? What I want, is in my Flash file to say sending,
    until I get then feedback from the php, and then say, sent
    successfully.
    Thanks a lot for any help!

    It is all inside an ifStatment that is inside a function,
    which gets called by the button that send the form. Here is the
    full thing.
    function validateForm(tName:String, tEmail:String,
    tSubject:String, tMsg:String):Void {
    trace("validateForm was called");
    if (tName == "" || tName == undefined) {
    trace("tName if");
    this.showAlertMsg("Please enter your name");
    } else if (tEmail == "" || tEmail == undefined ||
    tEmail.indexOf("@") == -1 || tEmail.indexOf(".") == -1) {
    trace("Invalid email address: "+tEmail+" infexOf1:
    "+tEmail.indexOf("@")+" indexOf2: "+tEmail.indexOf("."));
    this.showAlertMsg("Invalid email address");
    } else if (tSubject == "" || tSubject == undefined) {
    trace("tSubject if");
    this.showAlertMsg("Please enter a subject");
    } else if (tMsg == "" || tMsg == undefined) {
    trace("tComments if");
    this.showAlertMsg("Please enter some comments");
    } else {
    trace("the else was called...");
    var send_lv = new LoadVars();
    //send_lv.onLoad = ShowStatus;
    //send_lv.EmailType = "Quote";
    send_lv.Name = tName;
    send_lv.FromEmail = tEmail;
    send_lv.Subject = tSubject;
    send_lv.Comments = tMsg;
    send_lv.status = "";
    send_lv.sendAndLoad("php/sendContact.php",result_lv,"Post");
    this.showAlertMsg("Sending...");
    var submitListener:Object = new Object();
    submitListener.click = function(evt:Object) {
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    this.tf_showAlertMsg.text = "Thank you for sending us an
    email";
    } else {
    this.tf_showAlertMsg.text = "Email did not go through";
    function showAlertMsg(msg:String):Void {
    this.tf_showAlertMsg.text = "";
    this.tf_showAlertMsg.text = msg;
    this.send_btn.onRelease = function() {
    validateForm(tf_Name,tf_Email,tf_Subject,tf_Comments);
    I tried the new way Dave posted and it still does not get the
    echo from the form.
    Thanks so much to both of you for the help!

  • Need help with PHP form with checkboxes, radio buttons and file attachment

    Hi guys,
    I'm having a nightmare with this PHP form where a user can fill it in, attach a doc/pdf and submit. After trying to sort it out with previous code I've used, I've stripped it out and think I should just start again in the hope you geniuses can help!
    Here is the HTML of contact.php:
    <form action="" method="post" name="contact" id="contact">
        <p>Job Title:*<br />
        <input name="position" type="text" /></p>
        <p>Nationality:*<br />
        <select name="nationality">
          <option value="">-- select one --</option>
          <option value="Afghan">Afghan</option>
          <option value="Albanian">Albanian</option>
          <option value="Algerian">Algerian</option>
          <option value="Zambian">Zambian</option>
          <option value="Zimbabwean">Zimbabwean</option>
        </select>
        </p>
        <p>Which country are you currently living in?*<br />
        <select name="country">
        <option value="">-- select one --</option>
        <option value="United Kingdom">United Kingdom</option>
        <option value="Afghanistan">Afghanistan</option>
        <option value="Africa">Africa</option>
        <option value="Zambia">Zambia</option>
        <option value="Zimbabwe">Zimbabwe</option>
        </select>
        </p>
        <label class="radio" for="checkRight">Yes/No question?</label><br />
        <input class="radio" type="radio" name="right" value="Yes" /> Yes
        <input class="radio" type="radio" name="right" value="No" /> No
        <input class="radio" type="radio" name="right" value="N/A" /> Not applicable
        <p>Yes/No question?<br />
        <select name="continue">
        <option value="">-- select one --</option>
        <option value="Yes">Yes</option>
        <option value="No">No</option>
        </select>
        </p>
        <p>Select your resorts:<br />
        Resort 1<input name="res1" type="checkbox" value="Resort 1" />
        Resort 2<input name="res2" type="checkbox" value="Resort 2" />
        Resort 3<input name="res3" type="checkbox" value="Resort 3" />
        Resort 4<input name="res4" type="checkbox" value="Resort 4" />
        Resort 5<input name="res5" type="checkbox" value="Resort 5" />
        Resort 6<input name="res6" type="checkbox" value="Resort 6" />   
        </p>
        <p>Don't send form unless this is checked:* <input type="checkbox" name="parttime" value="Yes" /></p>
        <p>Date of arrival: <input name="arrive" id="datepick" /><br />
        Date of departure: <input name="depart" id="datepick2" /></p>
        <script type="text/javascript" src="assets/scripts/datepickr/datepickr.js"></script>
        <link href="assets/scripts/datepickr/datepickr.css" rel="stylesheet">
        <script type="text/javascript">
        new datepickr('datepick');
        new datepickr('datepick2', {
        </script>
        <p>Name:*<br />
        <input name="name" type="text" /></p>
        <p>E-mail:*<br />
        <input name="email" type="text" /></p>
        <p>Telephone:*<br />
        <input name="telephone" type="text" class="ctextField" /></p>
        <p>Upload CV (Word of PDF formats only):<br />
        <input type="file" name="cv" class="textfield"></p>
        <p><input name="submit" value="Submit Enquiry" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    By the way, the date boxes work so excuse the Javascript in there!
    To prevent SPAM I've used a trick where there's a hidden URL field which must be left blank for the form to submit which you can see in the PHP.
    Below is where I'm at with the PHP which is placed above the header of contact.php...
    <?php
    if (array_key_exists('submit', $_POST)) {
        $position = $_POST['position'];
        $arrive = $_POST['arrive'];
        $nationality = $_POST['nationality'];
        $parttime = $_POST['parttime'];
        $depart = $_POST['depart'];
        $name = $_POST['name'];
        $email = $_POST['email'];
        $telephone = $_POST['telephone'];
    $to = "[email protected]";
    $subject = "Recruitment Application";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $headers .= 'From: My Website <[email protected]>' . "\r\n";
    $message= "
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    if (!isset($warning)) {
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mywebsite.co.uk/sent.php' );
    ?>
    I would like to make pretty much all the field compulsory so if a field is left empty (other than the hidden URL field), a warning message is displayed next to that field.
    Also I would like the file upload field to attach to the email that is sent to me and have the results come through to me in a table format.
    Can anyone help me get my form working?
    Thank you and I hope to hear from you!
    SM

    Hi Nancy,
    Great stuff, thank you for the reply.
    I've managed to get the Formm@iler working and running as I need it to.
    The only thing I'm struggling with is when the user clicks submit, they are taken to a page of whatever results the form returned but it is just a white background with Times New Roman text.
    How can I have it so the user is taken to the form results in the websites' page layout?
    I tried sending them to a generic 'thank you' page by adding the following code but it just took them there whatever the results of the form so that's no good...! I have a feeling it's a bit more complicated than that...
    header( 'Location: http://www.nofussbus.co.uk/test/sent.php' );
    Thank you for your help!

  • PHP form layout issue

    Hi all, I have a basic php form on a page, it works great,
    and my email recieves the content as required, BUT, when the form
    submits and the page shows the forms content, it throws out my
    layout ocmpletely. My white maincontent dissapears, and the footer
    div is all misaligned, my code is attached. Can anyone help please?
    many thanks

    On Thu, 7 Feb 2008 16:34:22 +0000 (UTC), "simbull"
    <[email protected]> wrote:
    >Thanks for the response gary, I have tried that (and just
    did again), that
    >means the user is not presented with the php output,
    which I do want them to be
    >ideally. Anyhow, that aside, it still throws my layout
    out..?
    Impossible to give you a better answer without knowing what
    you want to
    accomplish, but it sounds like your layout might be too
    fragile.
    Gary

  • Need to add senders email address into the subject header of my PHP form (somehow)

    Hello one and all,
    I have a PHP form which is working fine and sends our support team an email with the subject header 'Support'.
    I have been asked to fix this form to include the senders email address into the Subject header so that the support team can filter them easier and reply quicker.
    Any help would be very much appreciated indeed. The form code is below, let me know if you need the whole page.
    Thanks in advance,
    Bradley
    My current form PHP part looks like this: (and the HTML part is below in blue)
    <?php
        if($_GET["action"] == "email")
            $msg = "The following person need support:\n\n";
            $msg = $msg . "First Name: " . $_POST["FirstName"] . " " . $_POST["LastName"] . "\n";
            $msg = $msg . "Tel: " . $_POST["Tel"] . "\n";
            $msg = $msg . "Email: " . $_POST["FROM"] . "\n";
            $msg = $msg . "Support: " . $_POST["Support"] . "\n";
            $msg = $msg . "Model: " . $_POST["Model"] . "\n";
            $msg = $msg . "Comments: " . $_POST["Comments"] . "\n";
            $to ="[email protected]";
            $subject = "Support";
            $from = "From: " . $_POST["FROM"];
            mail($to, $subject, $msg, $emailFrom, $from);
            header("Location:support2.php");
    ?>
    and the HTML part of the fom is like this:
    <form id="form1" name="form1" method="post" action="support.php?action=email">
      <table width="700" border="0" cellspacing="10" cellpadding="10">
        <tr>
          <td valign="middle" class="formtext">*First name:</td>
          <td width="455" valign="middle"><label>
            <input name="FirstName" type="text" class="form-textbox" id="FirstName" />
          </label></td>
        </tr>
        <tr>
          <td valign="middle" class="formtext">*Last name:</td>
          <td valign="middle"><input name="LastName" type="text" class="form-textbox" id="LastName" /></td>
        </tr>
        <tr>
          <td valign="middle" class="formtext">*Email:</td>
          <td valign="middle"><input name="FROM" type="text" class="form-textbox" id="FROM" /></td>
        </tr>
        <tr>
          <td valign="middle" class="formtext">*Telephone:</td>
          <td valign="middle"><input name="Tel" type="text" class="form-textbox" id="Tel" /></td>
        </tr>
        <tr>
          <td valign="middle" class="formtext"> </td>
          <td valign="middle"> </td>
        </tr>
        <tr>
          <td valign="middle" class="formtext">*Support required:</td>
          <td valign="middle"><label>
            <select name="Support" class="form-dropdown" id="Support">
              <option selected="selected">Please select...</option>
              <option value="Connection Issues">Connection Issues</option>
              <option value="Technical Issues">Technical Issues</option>
              <option value="Furniture Faults">Furniture Faults</option>
              <option value="Other">Other</option>
            </select>
          </label></td>
        </tr>
        <tr>
          <td valign="middle" class="formtext">Chair model:</td>
          <td valign="middle"><input name="Model" type="text" class="form-textbox" id="Model" /></td>
        </tr>
        <tr>
          <td valign="middle" class="formtext">*Please describe your issue:</td>
          <td valign="middle"><textarea name="Comments" rows="5" class="form-textarea" id="Comments"></textarea></td>
        </tr>
        <tr>
          <td valign="middle" class="maintext"> </td>
          <td valign="middle" class="maintext"></td>
        </tr>
        <tr>
          <td valign="middle"> </td>
          <td valign="middle"><label>
            <input name="Submit" type="submit" class="form-submit-button" value="Submit" />
          </label></td>
        </tr>
      </table>
      </form>

    MurraySummers you sir, are an absolute legend! This worked perfect straight off the bat!
    I really apreciate your lightning fast reply!
    Thanks again.
    Bradley

  • Online php form (inserts) in pdf form and send via email

    So first hello all.
    There are 4 PDF Forms amd 4 php forms on a website.
    The user should be able to fill out the php form, click on send and the inserts from the user should be stored in the pdf form and send to an email adress.
    I know that there are 3rd party tools, the convert it to a image, draw the inserts and convert it back.
    But i want to know, how to do it with acrobat itself.
    Is there any way to put varaibles in the pdf where php can set (fill)
    If this is impossible:
    I have heard, that there is a server version from acrobat who can manage this.
    The information about this is rarly like i dont understand how much the costs are.
    First : price x (for the server software itself)   
    Second: price y (for every processed document)
    Many thanks in advance
    IT Technik Schiedt

    You cannot use Acrobat on a server in that manner. Acrobat is licensed for one user one system at a time.
    You can create and FDF file with the form field data and use that data to fill-in a PDF. You needd to create a unique PDF that could be added to an email and then deleted. You could also accumulate the data in a database.

  • Can you auto-attach files in a PHP form?

    Hi there,
    Have been looking over everywhere for a solution to my problem. I am going to try and be as clear as I can about the problem.
    I have had some experience making simple PHP forms that let the user put their name, email, subject and body text and send it in an email using the form.
    But for a project I am currently undertaking - the client has requested a form that will pre-attach a particular document to the email when it is sent. All the user has to do is input the email address of the adressee and their name/email address and all the other fields are custom made (i.e. subject, body text) - and the email will be sent to the selected recepient with the file already attached.
    I was envisaging the PHP script would collect the reference for a file that is already sitting on the web server and attach it in the function.
    Is there anyway to do this? Because if it isn't I may as well tell the client to go and use outlook - because the web form will really have no purpose.
    Thanks in advance

    Hi have proceeded along the path of inserting links
    into PHP generated email but I am having trouble in outputting the body message in HTML - All I get out
    in the output email is the HTML tags with the text (plain text).
    Did some research and found out that I have to determine the content type/charset.
    I have tried to do this in my PHP but to no avail. Also I am not getting the email or name of the sender in the email that is generated....
    Anyway, there is the PHP code (and it's not that tight but it works):
    AND SOME DEFAULT TEXT THAT WILL CONTAIN LINKS TO NECESSARY FILES TO DOWNLOAD:
    link to PDF '.$field_message; $headers = 'From: '.$cf_yremail."\r\n"; $headers .= 'Reply-To: '.$cf_yremail."\r\n"; /* If your e-mail is not valid show error message */ if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $mail_to)) { ?>
    Any help on this would be much appreciated....
    Thanks

  • Code issue in php form - submit button not sending email

    Created a form that was originally supposed to open up to 2 pages depending on what was clicked. Clear would send you to an error page, and submit would send you to a thank you page. Decided that was a waste and so did not create the html pages. BUT, wanted the form info for the contact page.
    Here is the issue: it will not submit when submit is clicked. It clears when you click clear, but there's no email coming from the site via submit.
    Do I need to edit the php form code if I don't want the other pages? I've looked at what I have but I don't see if there is a form error or anything here. Here is the code for anyone who wants to have a look. Thanks in advance.
    <?php
    // get posted data into local variables
    $EmailFrom = "EMAIL FROM WEP PAGE - CONTACT - ";
    $EmailTo = "[email protected]";
    $Subject = "EMAIL FROM jennylowhar.com - CONTACT -";
    $name = Trim(stripslashes($_POST['name']));
    $telephone = Trim(stripslashes($_POST['telephone']));
    $email = Trim(stripslashes($_POST['email']));
    $comments = Trim(stripslashes($_POST['comments']));
    // validation
    $validationOK=true;
    if (Trim($name)=="") $validationOK=false;
    if (Trim($email)=="") $validationOK=false;
    if (!$validationOK) {
      print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
      exit;
    // prepare email body text
    $Body = "";
    $Body .= "name: ";
    $Body .= $name;
    $Body .= "\n";
    $Body .= "telephone: ";
    $Body .= $telephone;
    $Body .= "\n";
    $Body .= "email: ";
    $Body .= $email;
    $Body .= "\n";
    $Body .= "comments: ";
    $Body .= $comments;
    $Body .= "\n";
    // send email
    $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
    // redirect to success page
    if ($success){
      print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
    else{
      print "<meta http-equiv=\"refresh\" content=\"0;URL=error.php\">";
    ?>

    I'm confused by that, but I know this works.
    $fname=STRIPSLASHES($_POST['fname']);
    $lname=STRIPSLASHES($_POST['lname']);
    $title=STRIPSLASHES($_POST['title']);
    $company=STRIPSLASHES($_POST['company']);
    $street=STRIPSLASHES($_POST['street']);
    $town=STRIPSLASHES($_POST['town']);
    $zip=STRIPSLASHES($_POST['zip']);
    $phone=STRIPSLASHES($_POST['phone']);
    $fax=STRIPSLASHES($_POST['fax']);
    $county=STRIPSLASHES($_POST['county']);
    $phone=STRIPSLASHES($_POST['phone']);
    $email=STRIPSLASHES($_POST['email']);
    $comments=STRIPSLASHES($_POST['comments']);
    $date=STRIPSLASHES($_POST['date']);
    $time=STRIPSLASHES($_POST['time']);
    $location=STRIPSLASHES($_POST['location']);
    $from="$email";
    $to="putemailhere";
    $subject="Submission from Contact Form";
    $msg= "This is a submission from yoururl.com.\n\n"
    . "Clients Name: $fname . $lname \n"
    . "Title: $title\n"
    . "Company Name: $company\n"
    . "Street Address: $street\n"
    . "Town:$town\n"
    . "Zip: $zip\n"
    . "Telephone: $phone\n"
    . "Email Address: $email\n"
    . "Comments: $comments\n";
    mail($to, $subject, $msg, 'From:' .$from);
    PS, go back and edit your origial post and REMOVE your email.
    Gary

  • Error in Form Handler Properties?

    Hi
    I've got at strange error in the Form Handler Properties window. When I open an Event Handler I have inserted earlier it gives me this:
    Library oand Function fields are empt. If I try to open the optionset on Library its empty?
    When I close down the form again it gives me this really "informative" error:

    Hi,
    regarding the SQL error, my suggestion is to find a way to replicate it on demand (for example if it happens always when you update a certain field) and enable tracing, in this way you can get more detailed information on the error (when you enable the trace
    CRM will slow down and the log is big, for this is better to enable it just for logging when you have the error)
    hope it helps
    My blog: www.crmanswers.net -
    Rockstar 365 Profile

  • Php form problem and question

    I am a new web designer who is not code savey yet. Anyway
    during the various sites i have designed i have used 3 different
    forms that process and email it to me using a seperate php form, 1
    in flash, 2 from a standard html form on a windows server. All have
    been uploaded, to the site, tested and worked fine. 2 are in old
    sites, one in my current site. Recently all 3 forms stopped working
    and while they looked like they worked fine they no longer actually
    sent anything. I had a big email arguement with my host and finally
    they added this line into my php script "ini_set
    ("sendmail_from","[email protected]");" email address is example here
    and they added another form to my site called "php4-cgi-fcgi.ini."
    Then my curent form started working again. I haven't changed
    anything, and of course the host never informed me of any changes.
    So why did this need to be added for my form to work again? Does
    this mean they upgraded to another version or something? Ihad a big
    arguement with them because they refused to tell me what they did
    that stopped all my forms from working, they kept acting like it
    was me or my provider that caused the problem, when i am positive
    we were not the problem. Any thoughts?

    doing a google on "ini_set ("sendmail_from" gives a lot of
    info.
    summary- the form script you are using is probably not
    setting a default
    "FROM" email address, so the host has phpmail() reject it as
    possible spam
    abuse.
    The .ini files the host added to your site correct the
    problem. They change
    values for php to use within your hosting domain.
    What php script are you using to send the emails? It is
    probably out of date
    if it doesn't address this issue.
    Off Topic: suggest never arguing with hosting support. Even
    it the person at
    the other end of the phone is an 18 year old drone not
    earning their salt.
    Move the site if needed. Develop social engineering skills to
    get things
    done.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

Maybe you are looking for

  • How to use the next 'initial' cost center in infotype 0027

    Hello experts! I need some help in posting in infotype 0027 which should be fairly easy to most of you. As you guys know, there are a total of 25 cost centers available (KST01-KST25) for this infotype. What I want to do is check from KST01 if it exis

  • Cannot get UI Command to work

    I am trying to run the only edit command (and an other UI Command) but when I type: http://www.myportal.com:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.uidetails/documents/public Documents/KM Documentation/.?uicommand=discussion ....I do not g

  • Closing tag in xml transformation

    Hi experts, I have the following ABAP code: ABAP itab to XML string   CALL TRANSFORMATION id SOURCE data = ti_stocks[]                          RESULT XML    ps_output. The result in ps_output should be an xml like this <?xml version="1.0" encoding="

  • Use Visual Composer models in GP NetWeaver CE 7.1

    Hi to all, i have a question regarding VC and GP on NetWeaver CE 7.1(trial version) I have a compiled and deployed VC model - it is a normal UI. I have created a CO from it and tried to use it in GP as action. But the process never goes to the next s

  • ADF: ValueChangeListener works but resulting ListBox is not rendered

    Hello, after trying for myself quite a while and searching here in the forums I almost give up since it does not seem to work. I have a form within a panelpage which consists of a text input field, two selectOneChoices (both with autosubmit), one sel