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!

Similar Messages

  • PHP Form Mail Scripts

    What is a good resource for pre-made PHP Form Mailer Scripts.
    This is for use with a website hosted on GoDaddy.
    My client has a few requirements that the GoDaddy script does
    not offer (and the script I chose from GoDaddy is uneditable). I
    know nothing about scripting but thought I could use a pre-made
    script and modify it...is that crazy thinking on my part?
    Here are the special requests from my client:
    - They'd like to see the time the form was submitted in EST
    (the GoDaddy script puts the time in military time in another time
    zone in the subject line). Can this appear in the body of the email
    as well as the subject line?
    - They'd like the form to be sent to the person submitting it
    as well as to their company
    - They would like to be able to REPLY TO the email they
    receive with the form submission and have it be addressed to the
    person submitting the form. The current script has the email
    addressed to themselves (the company) if they click REPLY TO, so
    they are replying to themselves
    - Although this has nothing to do with the Form Mailer script
    as far as I can guess, they asked that the person filling out the
    form be able to print it prior to submitting (in my opinion,
    though, if i can have a copy of the submission sent to the
    submitter, there's no reason for this). But if anyone knows how to
    do this, please let me know.
    - Finally, the client wants to know if each submission can
    have a unique tracking number assigned to it.
    Thank you all. Any feedback is appreciated.
    Richard

    Hi,
    I can without any doubt recommend Forms 2 Go:
    http://www.bebosoft.com/products/formstogo/index.php
    Very easy to use and even someone like me who don't know a
    lot of
    programming, use it extensively.
    Deon
    "RichyZee" <[email protected]> wrote in
    news:gcvkac$fcp$[email protected]:
    > What is a good resource for pre-made PHP Form Mailer
    Scripts. This is
    > for use with a website hosted on GoDaddy.
    >
    > My client has a few requirements that the GoDaddy script
    does not
    > offer (and
    > the script I chose from GoDaddy is uneditable). I know
    nothing about
    > scripting but thought I could use a pre-made script and
    modify it...is
    > that crazy thinking on my part?
    >
    > Here are the special requests from my client:
    >
    > - They'd like to see the time the form was submitted in
    EST (the
    > GoDaddy
    > script puts the time in military time in another time
    zone in the
    > subject line). Can this appear in the body of the email
    as well as the
    > subject line?
    >
    > - They'd like the form to be sent to the person
    submitting it as well
    > as to
    > their company
    >
    > - They would like to be able to REPLY TO the email they
    receive with
    > the form
    > submission and have it be addressed to the person
    submitting the form.
    > The current script has the email addressed to themselves
    (the company)
    > if they click REPLY TO, so they are replying to
    themselves
    >
    > - Although this has nothing to do with the Form Mailer
    script as far
    > as I can
    > guess, they asked that the person filling out the form
    be able to
    > print it prior to submitting (in my opinion, though, if
    i can have a
    > copy of the submission sent to the submitter, there's no
    reason for
    > this). But if anyone knows how to do this, please let me
    know.
    >
    > - Finally, the client wants to know if each submission
    can have a
    > unique
    > tracking number assigned to it.
    >
    > Thank you all. Any feedback is appreciated.
    >
    > Richard
    >
    >

  • PHP Form mail

    I used this script
    http://www.visibilityinherit.com/code/php-form-validation.php
    to produce a form and everything worked fine on my site, which I
    was using for testing. When I transferred over to the client's site
    it doesn't send the email. The error and thank you messages work,
    but no email. As I have heard that some hosts block some php files
    with the name 'formmail' I called it something else.
    I have checked and rechecked all the data and only my email
    address and the URLs for the error and thank you pages had to be
    changed, my email is correct, but still not email.
    Any ideas as to what is happening and how I can get around it
    please?
    Rosalind

    I have been sent the following information and code, but have
    not succeeded in working out where to add it. The code I am using
    is underneath. Many thanks
    - to send emails through our servers you must comply with one
    of the following rules
    a. The sending email must be from your domain
    b. The receiving email must be from your domain
    This account could/should be [email protected]
    - To avoid a wrong use of our scripts by spammers you must
    had a line before you call the “mail” functionality
    ini_set("sendmail_from", " [email protected] ");
    - Please add to the email send code a functionality
    “-f” in the fifth parameter of the function send mail
    - This is the simple configuration of sending emails in php
    <?php
    ini_set("sendmail_from", [email protected]);
    mail($email_to, $email_subject, $email_message, $headers,
    '-f'[email protected]);
    ?>
    my php code is
    <?php
    // Input Your Personal Information Here
    $mailto = '[email protected]' ;
    $from = "FormosaParadise.com" ;
    $formurl = "
    http://formosaparadise.com/correios.php"
    $errorurl = "
    http://formosaparadise.com/formmailerror.php"
    $thankyouurl = "
    http://formosaparadise.com/thankyou.php"
    // End Edit
    // prevent browser cache
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "
    GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    function remove_headers($string) {
    $headers = array(
    "/to\:/i",
    "/from\:/i",
    "/bcc\:/i",
    "/cc\:/i",
    "/Content\-Transfer\-Encoding\:/i",
    "/Content\-Type\:/i",
    "/Mime\-Version\:/i"
    if (preg_replace($headers, '', $string) == $string) {
    return $string;
    } else {
    die('You think Im spammy? Spammy how? Spammy like a clown,
    spammy?');
    $uself = 0;
    $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" :
    "\n" ;
    if (!isset($_POST['email'])) {
    header( "Location: $errorurl" );
    exit ;
    // Input Your Personal Information Here
    $name = remove_headers($_POST['name']);
    $email = remove_headers($_POST['email']);
    $phone = remove_headers($_POST['phone']);
    $comments = remove_headers($_POST['comments']);
    $http_referrer = getenv( "HTTP_REFERER" );
    // End Edit
    if
    (!preg_match("/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i",$email))
    header( "Location: $errorurl" );
    exit ;
    // Input Your Personal Information Here
    if (empty($name) || empty($email) || empty($phone)
    ||empty($comments)) {
    header( "Location: $errorurl" );
    exit ;
    // End Edit
    if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) {
    header( "Location: $errorurl" );
    exit ;
    if (get_magic_quotes_gpc()) {
    $comments = stripslashes( $comments );
    // sets max amount of characters in comments area (edit as
    nesesary)
    if (strlen($comments) > 1250) {
    $comments=substr($comments, 0, 1250).'...';
    // End Edit
    $message =
    "This message was sent from:\n" .
    "$http_referrer\n\n" .
    // Input Your Personal Information Here
    "Name: $name\n\n" .
    "Email: $email\n\n" .
    "Phone No: $phone\n\n" .
    "Comments: $comments\n\n" .
    "\n\n------------------------------------------------------------\n"
    // End Edit
    mail($mailto, $from, $message,
    "From: \"$name\" <$email>" . $headersep . "Reply-To:
    \"$name\" <$email>" . $headersep );
    header( "Location: $thankyouurl" );
    exit ;
    ?>

  • Php form mailer help

    I have this form that I got to work with my flash file. There
    is part of the php that should send an acknowledgement email and it
    seems to be not working. I am wondering if someone could explain
    what I am missing.
    I think I have everything working down to line 16. After
    that, I think I understand what is going on, but might be missing
    some things.
    How can I use the echo and &Status to make sure in my
    Flash file that the form actually got send?
    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!

  • Problem with php form in flash

    Hi I've uploaded a PHP email form, but when clicked it says
    the message has been sent, but nothing actually happens. I've
    checked with the host and they do support PHP. I'm thinking that
    the action script isn't finding the php and maybe I uploaded it
    incorrectly. I uploaded the php into the same folder as the swf and
    html. All the php is correct. what else could be going wrong? It
    may also be the action script. I've attached the AS to this
    message. any help would be much appreciated.
    here is the link
    http://www.maddadesigncompany.com/form4/

    I'm no expert on this stuff - I'm guessing its something to
    do with the setup on the server for php.
    I use WAMPserver to test locally (using windows) and so I
    test most stuff locally first, so I just tested the Kirupa
    email.php file locally and can get things to work. Can you see a
    phpinfo page or just put up a file like this:
    <?php
    print "browser test";
    ?>
    If you put that up as say, test.php and navigate to it in
    your browser ... and it doesn't work... then its definitely a
    setting on your server. Perhaps php itself needs to be enabled or
    some directory level access or something... like I said I'm no
    expert, sorry.

  • CDONTS Form Mail question - help needed

    I have a form on my asp page called MyMail.asp. The form is
    linked to cdonts.asp_form.asp which sends an email of filled in
    text boxes and comboboxes to my email address.
    It works fine when all the fields (eight of them) are filled
    in, but doesnt send the email if any of the textboxes are left
    blank. How can I make it send the email if some of the textboxes
    are blank? I have downloaded Yaromat, but it only seems to make
    fields become "required". I want to be able to send the email with
    say 3 of the eight fields filled out - ie not all of them are
    compulsary.
    Regards
    Billy

    Here is the code -
    Firstly the form itself (mymail.asp) -
    <form action="/cdonts_form.asp" method="post"
    name="MyForm" id="MyForm">
    <table width="200" border="1" align="center"
    bordercolor="#999999" bgcolor="#CCCCCC">
    <tr>
    <td>Title</td>
    <td><select name="MyTitle" id="MyTitle">
    <option value="Mr">Mr</option>
    <option value="Mrs">Mrs</option>
    <option value="Miss">Miss</option>
    <option value="Ms">Ms</option>
    <option value="Dr">Dr</option>
    <option value="Please Select" selected>Please
    Select</option>
    </select></td>
    </tr>
    <tr>
    <td>First Name </td>
    <td><input name="firstname" type="text"
    id="firstname2" size="30"></td>
    </tr>
    <tr>
    <td>Last Name </td>
    <td><input name="lastname" type="text"
    id="lastname2" size="30"></td>
    </tr>
    <tr>
    <td valign="top">Address</td>
    <td><textarea name="MyAddress" cols="28" rows="6"
    id="MyAddress"></textarea></td>
    </tr>
    <tr>
    <td>Email Address </td>
    <td><input name="email" type="text" id="email3"
    size="30"></td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td>Telephone</td>
    <td><input name="MyTelephone" type="text"
    id="MyTelephone"></td>
    </tr>
    <tr>
    <td>Mobile Phone </td>
    <td><input name="MyMobile" type="text"
    id="MyMobile"></td>
    </tr>
    <tr>
    <td>Where did you hear about us?</td>
    <td>red
    <input name="colour1" type="checkbox" id="colour12"
    value="red">
    blue
    <input name="colour2" type="checkbox" id="colour22"
    value="blue">
    green
    <input name="colour3" type="checkbox" id="colour32"
    value="green"></td>
    </tr>
    <tr>
    <td valign="top"><p>Enquiry /
    Comments</p></td>
    <td><textarea name="comments" cols="28" rows="6"
    wrap="VIRTUAL" id="textarea"></textarea></td>
    </tr>
    <tr>
    <td> </td>
    <td><select name="test" id="select">
    <option value="test1">test1</option>
    <option value="test2">test2</option>
    <option value="test3">test3</option>
    </select></td>
    </tr>
    <tr>
    <td> </td>
    <td><input name="send" type="submit" id="send"
    value="Submit Form"></td>
    </tr>
    </table>
    </form>
    Next the code from the cdonts_form.asp page (the page which
    will send the email) -
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <%
    Dim MyMail
    Dim MyBody
    Dim MyEmail
    Dim MyFirstname
    Dim MyLastname
    Dim MyColour1
    Dim MyColour2
    Dim MyColour3
    Dim MyComments
    Dim MyTest
    Dim MyTitle
    Dim MyAddress
    Dim MyTelephone
    Dim MyMobile
    MyEmail = Request.Form("email")
    MyFirstname = Request.Form("firstname")
    MyLastname = Request.Form("lastname")
    MyColour1 = Request.Form("colour1")
    MyColour2 = Request.Form("colour2")
    MyColour3 = Request.Form("colour3")
    MyComments = Request.Form("comments")
    MyTest = Request.Form("test")
    MyTitle = Request.Form("MyTitle")
    MyAddress = Request.Form("MyAddress")
    MyTelephone = Request.Form("MyTelephone")
    MyMobile = Request.Form("MyMobile")
    MyBody = "First Name: "& MyFirstName & vbcrlf
    MyBody = MyBody & "Last Name: "& MyLastName &
    vbcrlf & vbcrlf
    MyBody = MyBody & "Email: "& MyEmail & vbcrlf
    MyBody = MyBody & "Colour 1: "& MyColour1 &
    vbcrlf
    MyBody = MyBody & "Colour 2: "& MyColour2 &
    vbcrlf
    MyBody = MyBody & "Colour 3: "& MyColour3 &
    vbcrlf & vbcrlf
    MyBody = MyBody & "Comments:" & vbcrlf
    MyBody = MyBody & MyComments & vbcrlf & vbcrlf
    'vbcrlf - Visual Basic Carriage Return Line Feed means leave a
    space!
    MyBody = MyBody & "Test:"& vbcrlf
    MyBody = MyBody & MyTest & vbcrlf & vbcrlf
    MyBody = MyBody & "Title: "& MyTitle & vbcrlf
    MyBody = MyBody & "Address: "& MyAddress & vbcrlf
    MyBody = MyBody & "Telephone: "& MyTelephone &
    vbcrlf
    MyBody = MyBody & "Mobile Number: "& MyMobile &
    Vbcrlf
    Set MyMail = Server.CreateObject ("CDONTS.NewMail")
    MyMail.From = MyEmail
    MyMail.To = "t**********@*******.com"
    MyMail.Subject = "Enquiry for Academy Of Counsellors - sent
    from website"
    MyMail.Body = MyBody
    MyMail.Send
    set MyMail=nothing
    Response.Write("Thankyou, Your e-mail has been sent")
    %>
    Hope this is helpful for you!!
    Regards
    Billy

  • 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 forms & required fields

    i'm creating an inquiry form for a client hosting w/godaddy.
    Site is in DW using godaddy's php form mail script. script
    works fine for sending formmail.
    Is it possible to validate form fields in php? the customer
    wants to have the first name, email address, etc. being a required
    field or the form will not submit. godaddy support is clueless,
    they e-mailed a kb article on changing the form e-mail address as a
    solution.
    can anyone provide insight? thanx in advance!

    Sure it is. It's even possible to do it in javascript before
    the form gets
    submitted.
    Which DW are you using?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "donna_d" <[email protected]> wrote in
    message
    news:fn8468$r4n$[email protected]..
    > i'm creating an inquiry form for a client hosting
    w/godaddy.
    > Site is in DW using godaddy's php form mail script.
    script works fine for
    > sending formmail.
    >
    > Is it possible to validate form fields in php? the
    customer wants to have
    > the
    > first name, email address, etc. being a required field
    or the form will
    > not
    > submit. godaddy support is clueless, they e-mailed a kb
    article on
    > changing
    > the form e-mail address as a solution.
    >
    > can anyone provide insight? thanx in advance!
    >

  • I am trying to use GoDaddy's gdform.php for a form mailer in Flash CS4. Can anybody help with coding

    Hello Everyone,
    I am starting to learn Flash and created a form mailer for a website I am working on.  The following code is what I have in AS3.0 and it all loads fine in the web browser, but I do not receive the email with the info.
    var address:String = "gdform.php";
    var url:URLRequest;
    var variables:URLVariables = new URLVariables ();
    variables.subject = "New Fighter Profile";
    submit_btn.addEventListener(MouseEvent.CLICK,sendForm);
    function sendForm(event:MouseEvent):void{
        variables.FirstName = firstname_txt.text;
        variables.LastName = lastname_txt.text;
        variables.Birthdate = birthdate_txt.text;
        variables.Nickname = nickname_txt.text;
        variables.HeightFt = hft_txt.text;
        variables.HeightIn = hin_txt.text;
        variables.Weightclass = weightclass_txt.text;
        variables.RecWins = wins_txt.text;
        variables.RecWins = losses_txt.text;
        variables.Debut = debut_txt.text;
        variables.Hometown = hometown_txt.text;
        variables.FightClub = fightclub_txt.text;
        variables.Styles = styles_txt.text;
        variables.Email = email_txt.text;
        variables.Bio = bio_txt.text;
        url = new URLRequest (address);
        url.method = URLRequestMethod.POST;
        url.data = variables;
        navigateToURL (url);
        var reqThanks:URLRequest=new URLRequest("thanks.html");
        navigateToURL(reqThanks,"_blank");
        var reqHome:URLRequest=new URLRequest("index.html");
        navigateToURL(reqHome,"_parent");
    Please Help!
    Thanks,
    John

    Maybe someone here can help.
    In spite of the site name, it is a Mac video card site.

  • 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 Help

    I just developed a simple php form (my first time). I am
    trying to enable the information that is typed in the form by
    visitors, to be emailed directly to me. So far I can only get the
    person's email address and message left in information box to be
    sent to my email address. However, there are other contents within
    the form that I also need to receive. Can anyone help.
    http://www.newnie.com/informationform.php
    http://www.newnie.com/handle_form.php

    On 18 Oct 2007 in macromedia.dreamweaver.appdev, CellaMarr
    wrote:
    > When I fill out the form and press send the only
    information that I
    > receive is the "First Name", "Email Address", and
    "Project Details".
    > All the other info does not show up. Why will it only
    send some of
    > the information and not all of it? ("Phone Number",
    "Profession",
    > "Budget", "Hosting", and "Domain")
    Because you're not telling it to send them to you. Consider:
    $success = mail($to, $subject, $detail, $headers);
    This line is correct and sends the email as it should. You're
    telling
    it that you want $detail as the body of the message. However,
    when you
    load variables:
    $name = $_POST['name'];
    $email = $_POST['email'];
    $number = $_POST['number'];
    $detail = $_POST['detail'];
    $profession = $_POST['profession'];
    $entertainer = $_POST['entertainer'];
    $domain = $_POST['domain'];
    $hosting = $_POST['hosting'];
    $subject = 'Message from newnie.com'; // this is the subject
    line. you
    can make this say whatever you want
    $headers = "From: $name <$email>\n";
    $headers .= "Reply-To: $name <$email>\n";
    $to = '[email protected]'; //change this to your email
    you're only putting the contents of the 'detail' form field
    into
    $detail. You need to do something more like:
    $body = 'Name: ' . $_POST['name'] . "\n";
    $body .= 'EMail: ' . $_POST['email'] . "\n";
    $body .= 'Number: " . $_POST['number'] "\n";
    // etc
    $subject = 'Message from newnie.com'; // this is the subject
    line. you
    can make this say whatever you want
    $headers = "From: $name <$email>\n";
    $headers .= "Reply-To: $name <$email>\n";
    And your mail() statement becomes:
    $success = mail($to, $subject, $body, $headers);
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • Contact forms in Flash (AS3/PHP)

    Hello,
    I have created a form in flash (CS5) using AS3 and Php.
    The test run worked absolutely fine but now I have added the form to my (original) flash movie it has a number of errors come up...
    Thing is that I've just spent the last 2 hours trying to get this form to work and having no success what so ever.
    So does anyone know what the following complier errors mean and how I can solve this issue?
    Scene 1
    1152: A conflict exists with inherited definition flash.display:DisplayObject.name in namespace public.
    ComponentShim (Compiled Clip), Line 1
    5000: The class 'fl.controls.TextArea' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
    ComponentShim (Compiled Clip), Line 1
    5000: The class 'fl.controls.TextInput' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
    ComponentShim (Compiled Clip), Line 1
    5000: The class 'fl.controls.UIScrollBar' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
    ComponentShim (Compiled Clip), Line 1
    5000: The class 'fl.controls.Button' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
    Yes, I'm obviously a newbie and still getting to grips with flash so any help would be amazing!
    Thank you in advance,
    Jos

    add those components to the library of your main (ie, loading) fla.

  • 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/

  • Help with ASP form mail code PLEASE

    Hello
    I am SOOooo close to this form mail code working correctly.
    It is correctly sending the forms info to the form owner via
    an email.
    The only problem is it also sends an email as soon as the
    page spawns and before the form is filled out. (with just the
    labels of course)
    Could someone PLEASE take a look and tell me specifically
    what to change? Trying to woo the boss!
    Thank you.
    (I included the code for the form mail only....let me know if
    I need to post the code for the whole ASP doc)

    See: http://developers.sun.com/techtopics/mobility/midp/articles/midp2network/

  • Making a Contact Form w/ Flash 5

    Hi,
    I searched the site first and did find a downloadable
    pre-made contact form that works with Flash, but I don't know that
    it will work with my ancient version since it uses PHP to mail the
    form. I use flash for drawing more than anything and don't know a
    whole lot about actionscript. I'm building a new website however,
    and would like to include a flash form for people to contact me
    through rather than email. I assume this can be done with Flash 5
    using some sort of send form action but I could use a little help
    in figuring this one out.
    Thanks

    http://www.flash-db.com/Tutorials/email/

Maybe you are looking for