Results 1 to 4 of 4

Thread: Submit form info to 2 locations

  1. #1
    Join Date
    Nov 2005
    Posts
    40
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Submit form info to 2 locations

    Ok, I have a form at http://www.decisionfacilitation.com/...onFormID=19678
    And it currently is setup to submit information to an online database. (got it from my host). But what I want to do is get a copy of the email of everyone who subscribes to my newsletter too. (the system doesn't do that).

    So, how can I setup this form so that the online database gets the information and I also get the information in an email? How do I pass the data to two different locations?

    BTW, I am pretty new to all this as I mainly do Desktop Publishing.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:exslt="http://exslt.org/common" xmlns:edyn="http://exslt.org/dynamic" xmlns:estr="http://exslt.org/strings" xmlns:admin="http://www.schlund.de/tinc/admin" xmlns:guest="http://www.schlund.de/tinc/guest" xmlns:menu="http://www.schlund.de/tinc/menu" xmlns:gen="http://www.schlund.de/tinc/general" xmlns:var="http://www.schlund.de/tinc/variables" xmlns:cpn="http://www.schlund.de/tinc/components" xmlns:dyn="http://www.schlund.de/tinc/dynpages" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pmtns="http://schemas.schlund.de/pmt">
    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link href="http://www.decisionfacilitation.com/spicons/tinc/oaoconfig_us/newsletter/style/index.css" rel="stylesheet" type="text/css" /></head>
    <body>
    <form action="http://www.decisionfacilitation.com/tinc" method="post" accept-charset="utf-8">
    <input type="hidden" name="try" value="true" />
    <input type="hidden" name="RegistrationFormID" value="19678" />
    <div class="box">
    <input type="hidden" name="key" value="YrUz9HAQ" />
    <h1>Subscribe</h1>
    <table cellpadding="2" cellspacing="1">
    <tr class="message"><td colspan="2"><div>Please make sure all fields are filled in. Those marked with a star are mandatory.</div></td></tr>
    <tr class="high  mandatory"><td class="title">
        E-mail:
      <strong> *</strong></td><td><input type="text" name="EMail" class="text" size="15" value="" /></td></tr>
    <tr class="low"><td class="title">
        First name:
      </td><td><input type="text" name="FirstName" class="text" size="15" value="" /></td></tr>
    <tr class="high"><td class="title">
        Last name:
      </td><td><input type="text" name="Name" class="text" size="15" value="" /></td></tr>
    <tr style="vertical-align:bottom"><td style="text-align:left"><a href="http://www.decisionfacilitation.com/tinc?key=CK8DcT9i&amp;RegistrationFormID=19678">Unsubscribe</a></td><td colspan="2"><input type="submit" class="submit" style="float:right" value="Subscribe" /></td></tr>
    </table></div></form>
    </body>
    </html>
    Last edited by SawnDiddle; 12-05-2007 at 11:26 PM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can't do both at once. You will need to use a server side language to retransmit the data to a second location.

    There was another thread about the same subject with, I believe, more complex answers you will probably find useful.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Nov 2005
    Posts
    40
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    ok, so if I change
    Code:
    <form action="http://www.decisionfacilitation.com/tinc" method="post" accept-charset="utf-8">
    to
    Code:
    <form action="form.php" method="post" accept-charset="utf-8">
    And have form.php say...
    Code:
    <?php
      $email = $_REQUEST['EMail'] ;
      $first = $_REQUEST['FirstName'] ;
      $last = $_REQUEST['Name'];
      $message = $first + $last;
    
      mail( "yourname@example.com", "New Subscriber",
        $message, "From: $email" );
      header( "Location: http://www.example.com/thankyou.html" );
    ?>

    How do I implement the below so that tinc gets all the information above plus the registration form ID and also the key?
    Code:
    <form action="http://www.decisionfacilitation.com/tinc" method="post" accept-charset="utf-8">
    <input type="hidden" name="try" value="true" />
    <input type="hidden" name="RegistrationFormID" value="19678" />
    <div class="box">
    <input type="hidden" name="key" value="YrUz9HAQ" />
    Am I doing this right?

  4. #4
    Join Date
    Nov 2005
    Posts
    40
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    does anyone have any idea how I can use php to forward the information to the tinc script?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •