Script for a flash .php form!

Good day all! Right I have a flash _mc which I'm using in a
dreamweaver file. It has a form in it (as a _mc). And I'm using
combo box's for people to make a selection. Enter the name, e-mail
and hit send. And what I want is the information from the combo
box's, name and e-mail sent to an address. I have the page live so
I can test it. I fill in the form hit send, and I just get a blank
e-maill
Because I've used the combo box's there isn't a "var"
field to fill in so I put the "variables" name in the "data" field.
Is this right? And hear's the .php code. Hope someone can
help!

You should post your acitionscript. as well to show how you
are sending the variables to php. However I am pretty sure you need
to add a '.=' to all the $message othersiwse it won't concentina
the $mesage.... like...
$message = $_POST["email"];
$message .= $_POST["name"];
$message .= $_POST["treadColor"];
$message .= $_POST["baseColor"];

Similar Messages

  • OMG! Please help me with some actionscript for a flash .php form

    Wright I've been trying for ages to get this to work. I have
    10 combo boxes and tow input text fields in a "_mc" named "form"
    one send button with the following code on it.
    on (release) {
    form.loadVariables("email.php", "POST");
    I then have this code on the ".php" file.
    <?php
    $sendTo = "[email protected]";
    $subject = "Custom Sven Clog Order Form";
    $headers = "From: " . $_POST["name"];
    $headers .= "<" . $_POST["email"] . ">\r\n";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $headers .= "Return-Path: " . $_POST["email"];
    $email .= $_POST["email"];
    $name .= $_POST["name"];
    $message .= $_POST["treadColor"];
    $message .= $_POST["baseColor"];
    $message .= $_POST["bendOrNon"];
    $message .= $_POST["heelSize"];
    $message .= $_POST["nubucColors"];
    $message .= $_POST["galaxyColors"];
    $message .= $_POST["suedeColors"];
    $message .= $_POST["patentColors"];
    $message .= $_POST["leatherColors"];
    $styles .= $_POST["styles"];
    mail($sendTo, $subject, $message, "nEmail = $email\nStyles =
    $styels\nName = $name";
    ?>
    I've looked at all the normal stuff that might be wrong, is
    the "email.php" file on the server? Yes!. Is the ".swf" file on the
    server? Yes! I just cant get the code wright! The form is made in
    "flash 8 PRO" And the ".swf" file is in a Dreamweaver site. Well
    the hole thing is in a Dreamweaver site.
    I fill out the form hit send and all I get back is blank
    email with the name, sent to and subject lines filed out.
    AAAAAAAARrrrrrrrrrr!
    Someone please for the of it all tell me wear the hell I have
    gone wrong? I thank you all for taking the time to read
    this!!!!

    Firstly again, your php script, you have now put a '.'
    infront of all of the variables.
    The '.' consentinas a string. It should read....
    <?php
    $sendTo = "[email protected]";
    $subject = "Custom Sven Clog Order Form";
    $headers = "From: " . $_POST["name"];
    $headers .= "<" . $_POST["email"] . ">\r\n";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $headers .= "Return-Path: " . $_POST["email"];
    $email = $_POST["email"];
    $name = $_POST["name"];
    $message = $_POST["treadColor"];
    $message .= $_POST["baseColor"];
    $message .= $_POST["bendOrNon"];
    $message .= $_POST["heelSize"];
    $message .= $_POST["nubucColors"];
    $message .= $_POST["galaxyColors"];
    $message .= $_POST["suedeColors"];
    $message .= $_POST["patentColors"];
    $message .= $_POST["leatherColors"];
    $styles = $_POST["styles"];
    Also you need to close the brackets in your mail()
    function....
    mail ($sendTo, $subject, $message,$headers);
    That is the first problem. Your big problem is that you
    aren't sending any of the variables from your swf, to the php file.
    You need to look up loadVars(). I don't think you can use
    loadVariables, as you want to send the variables to php, not
    recieve them. You can use loadVars to sendAndLoad variables to the
    php... be it 'email','name' etc and the php script will email
    them.

  • Shell script for batch compilation of forms 10g on AIX 5.3L AS

    Hi All,
    Can anybody provide me the Shell script for batch compilation of forms 10g and reports 10g on AIX 5.3L AS?
    Regards,
    SAM

    Hi Alex,
    I tried with the below script as well as the one you had posted.
    ORACLE_HOME=/opt/oracle/OraHome_3
    export ORACLE_HOME
    TNS_ADMIN=$ORACLE_HOME/network/admin
    export TNS_ADMIN
    LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/jdk/jre/bin:$ORACLE_HOME/jdk/jre/bin/cla
    ssic:$LIBPATH
    export LIBPATH
    cd ../forms
    for i in `ls *.pll`
    do
    echo Compiling Library $i ....
    $ORACLE_HOME/bin/frmcmp module=$i userid=mydbuser/mydbuser@mydb
    batch=yes module_type=library
    compile_all=yes window_state=minimize
    done
    export ORACLE_HOME=/opt/oracle/OraHome_3
    export ORACLE_TERM=vt220
    export LD_LIBRARY_PATH=/opt/oracle/OraHome_3/lib:/opt/oracle/OraHome_3/jdk/jre/l
    ib:/opt/oracle/OraHome_3/jdk/jre/lib/i386:
    cd ../forms
    for i in `ls *.pll`
    do
    echo "Compiling Library $i ...."
    /opt/oracle/OraHome_3/bin/frmcmp module_type=form userid=mydbuser/mydbuser@mydb
    module=$i batch=yes compile_all=no
    window_state=minimize upgrade=no
    done
    echo "PLL Compilation done"
    But there was a same kind of error thst turning up all the time.
    Compiling Library Agf.pll ....
    Forms 10.1 (Form Compiler) Version 10.1.2.0.2 (Production)
    Forms 10.1 (Form Compiler): Release - Production
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE 10.1.0.4.0 Production
    FRM-10043: Cannot open file.
    Form not created
    I hence updated the permissions on the pll as below
    -rwxrwxrwx 1 oracle oinstall 335872 May 19 16:31 Agf.pll
    But the problem is still persisting.
    My environment details are as below.
    I am working on Win XP machine. Connected to my AS via telnet and xmanager. I have set my DISPLAY to my local IP.
    Is there any thing more that I need to do? If so then let me know.
    Regards,
    SAM

  • Flash/PHP form help

    I have posted this before a while back, but never figured it
    out. I think I am really close.
    When my form gets clicked, the following gets triggered:
    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";
    var send_lv:LoadVars = new LoadVars();
    send_lv.Name = tName;
    send_lv.FromEmail = tEmail;
    send_lv.Subject = tSubject;
    send_lv.Comments = tMsg;
    send_lv.Newsletter = tCheckBox;
    send_lv.status = "";
    send_lv.sendAndLoad("php/sendContact.php",result_lv,"POST");
    this.showAlertMsg("Sending...");
    Everything gets sent and all is working great. The only thing
    that does not work is the ifStatement in the result_lv never gets
    triggered. I think that this has to do with my php. I don't really
    speak php and so I am having issues with it.
    In the php I have two echos, which I was told I could use
    with the result_lv. I think that my result_lv, does either not know
    what it is listening to, or that my echos are wrong. The echos in
    the php look like this.
    //if($debug)
    echo "mes1 $ToEmailType $ToEmail $Subject $Message From:
    $Name $FromEmail\n ";
    and
    echo "&Status=Your quote request has been sent.";
    What do I have to do, so Flash receives the echo and I can
    tell the user that the info has been received.
    Thanks a lot for help with this!

    OK, great, I am getting closer! Thank you so much.
    I now get the "Email did not go through" case. The email gets
    sent though, so I am not sure why that is happening. I am assuming,
    where you say //find out if it's working first is working because
    the if statement gets triggered.
    How can I proceed from here?
    Thank you so much!

  • I need someone to write a Java Script for my Adobe Acrobat form. I do not know how to write Java Code

    I have never worked with Java coding and am in need of assistance for an acrobat form I am working on.
         - I have a form with a field identifier called BACompnayName (this is the field where they would enter their company name).
         - I then have a form field with two radials that says "Is the shipping address the same as the business Address" - "Yes" and "No" (the form identified for this field is SASame.
    What I am trying to accomplish:
         - If they click yes, I would like the form to fill in the information found in BACompanyName otherwise, leave it blank to be filled out by the person filling out the form.
    I appreciate any help.
    Thanks,
    Brett

    Something like the following?
    Checkbox for &quot;make billing address the same as shipping address&quot; doesn't work (JavaScript)

  • 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 script for form to upload 2 files to FTP

    Hi,
    I have scoured the internet for quite a while now looking for
    a free php script that will enable me to:
    1. Put a form on a page that has two uplaod boxes for a
    client to upload two file svia theeir browser
    2.The files will be one image (jpg) and one pdf
    3. The files will always (each day) be called headshot.jpg
    and resume.pdf
    4. The script must allow the files on the server to be
    overwritten by the new files of the same name each day
    I have found MANY scripts, som eof which i can get to work,
    but they were too sofisticated (checked for many things taht i was
    not concerned for, didnt allow files to be overwritten, changed
    directories of where the files were uplaoded to, changed the file
    names automatically) and many that i wasnt able to get to work.
    I just need something simple like the above. Unfortunately I
    am no scripter, so when i tried to decifer the ready made scripts
    and rearrange them to suit my needs, i messed things up.
    Thanks immensely in advance of anyone who canb offer m eany
    help or point me in a better direction. I wasnt sure where to post
    this query/help plea.
    Cheska

    Go to
    http://www.php.net and read about
    file uploads there. You will find
    several scripts that will work just fine for you.
    Or try this -
    <?php
    //places files into same dir as form resides
    if(isset($_POST['Submit'])) {
    $target=$_SERVER['DOCUMENT_ROOT']."/uploads";
    foreach ($_FILES["files"]["error"] as $key => $error) {
    if ($error == UPLOAD_ERR_OK) {
    $tmp_name = $_FILES["files"]["tmp_name"][$key];
    $name = $_FILES["files"]["name"][$key];
    if(move_uploaded_file($tmp_name, "$target/$name")}
    print "Upload completed";
    else
    print "Upload failed";
    ?>
    <body>
    <form action="" method="post"
    enctype="multipart/form-data">
    <p>Pictures:
    <input type="file" name="files[]" />
    <input type="file" name="files[]" />
    <input type="submit" name="Submit" value="Send" />
    </p>
    </form>
    This assumes that the incoming files will be properly named,
    and that the
    upload destination is a folder called "/uploads".
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "ccesca" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi,
    >
    > I have scoured the internet for quite a while now
    looking for a free php
    > script that will enable me to:
    >
    > 1. Put a form on a page that has two uplaod boxes for a
    client to upload
    > two
    > file svia theeir browser
    > 2.The files will be one image (jpg) and one pdf
    > 3. The files will always (each day) be called
    headshot.jpg and resume.pdf
    > 4. The script must allow the files on the server to be
    overwritten by the
    > new
    > files of the same name each day
    >
    > I have found MANY scripts, som eof which i can get to
    work, but they were
    > too
    > sofisticated (checked for many things taht i was not
    concerned for, didnt
    > allow
    > files to be overwritten, changed directories of where
    the files were
    > uplaoded
    > to, changed the file names automatically) and many that
    i wasnt able to
    > get to
    > work.
    >
    > I just need something simple like the above.
    Unfortunately I am no
    > scripter,
    > so when i tried to decifer the ready made scripts and
    rearrange them to
    > suit my
    > needs, i messed things up.
    >
    > Thanks immensely in advance of anyone who canb offer m
    eany help or point
    > me
    > in a better direction. I wasnt sure where to post this
    query/help plea.
    >
    > Cheska
    >
    >
    >

  • Radio Buttons for Flash PHP email.

    Hi.
    I need to add a sign-up form for services to a flash AS2 web site.
    I found a very simple example of a Flash/ PHP email form at Kirupa.
    It works fine, but I need to add some radio buttons.
    My web site will offer various services.
    Ideally I would like to be able for viewers to sign up for a service by clicking the appropriate right radio buttons
    F.ex;
    •   Service 1
    •   Service 2
    •   Service 3
    •   Service 4
    The email should reflect the choices made by listing the text on the selected services (radio buttons).
    Please download the FLA and the PHP file (at the bottom of the tutorial) here:
    http://www.kirupa.com/developer/actionscript/flash_php_email.htm
    I have uploaded a working version here:
    http://gggraphic.com/flash_mail/simple_flash_mail.php
    How do I add and script the radio buttons with both AS and the PHP to make it happen?
    Thank you on beforehand for your help
    ggaarde

    Hi Again
    Maybe check buttons would be a more natural option for this. You should be able to select more than one service.
    Thanks
    ggaarde

  • Php form script assistance

    Hello please forgive me as I am new to this but really need assistance. I have a form created in html on a site and have tried numerous tutorials on creating a php script which would be linked to this html form, but each one I try either doesn't work or it seems as if it goes through but then I never recieve the mail in my mailbox. I used my yahoo account as well as another account and didn't get anything , can anyone please assist as to what I should do here is what I have so far.
    Thank you in advance for any assistance provided.
    HTML:
    <form name="contactform" method="post" action="mailer.php">
             Name          <input type="text" name="name"/><br/><br/>
             Email          <input type="text" name="email"/><br/><br/>
             Address      <input type="text" name="address"/><br/><br/>
             City            <input type="text" name="city"/><br/><br/>
             When to Contact <select name="dropdown">
                               <option value="Morning">Morning</option>
                               <option value="Afternoon">Afternooon</option>
                               <option value="Evening">Evening</option>
                               </select><br/><br/>
             Purpose of Contact <br/><textarea name="commment" rows="6" cols="40">
            </textarea><br/> <br/><input type="submit" value="Submit Form Now" name="submit"/>
            </form>
    Here is the script that I am using :
    <?php
    if(isset($_POST['submit'])) {
    $to = "[email protected]";
    $subject = "Inquiry Form";
    $name_field = $_POST['name'];
    $email_field = $_POST['email'];
    $address_field = $_POST['address'];
    $city_field = $_POST['city'];
    $comment= $_POST['comment'];
    $dropdown = $_POST['dropdown'];
    foreach($_POST['check'] as $value) {
    $check_msg .= "Checked: $value\n";
    $body = "From: $name_field\n E-Mail: $email_field\n $check_msg Option: $option\n Drop-Down: $dropdown\n Message:\n $message\n";
    echo "Data has been submitted to $to!";
    mail($to, $subject, $body);
    } else {
    echo "Form not Submitted!";
    ?>

    Hello thank you for responding... yes I believe it is , I have used a drag and drop flash component with a php script for another project I had worked on not too long ago and it worked fine. Im pretty sure it is running.
    Does the code and script that I provided look correct to you?

  • Is SWFOBject messing up my Flash/PHP 'contact form'?

    Hi all,
    First post, and first project using Flash!
    Here's the
    page I'm having problems with...
    It's an email contact page that uses a Flash contact form
    that I purchased from iStockphoto. The swf uses a PHP script that I
    keep in the same location on my server as the swf. The PHP sends
    the email to my specified address. In theory that should work fine,
    but in the interests of keeping things working across browsers, and
    maintaining my Validation, I've been calling the swf using
    SWFObject.
    However, something is screwed up. When I click on 'Send' on
    the successfully embedded Flash form, nothing happens. Neither my
    hosting providers nor the author of the flash have been able to
    work out why - although they both agree that SWFObject may have
    something to do with it.
    Please bear in mind that I'm REALLY new to Flash, although
    I'm by no means a technonewbie - tell me what I'm looking for and
    what to change and I can keep up, but someone posted the following
    on another forum I frequent and I have no idea what it means:
    quote:
    Submitting a form relies on either a post or get method,
    maybe SWFObject needs specific configuration to do this. If it
    doesn't support either of those two methods you may need to use an
    interim piece of javascript or something to accept the form
    variables then call your sendmail.
    Help much appreciated!
    Owen

    kglad,
    The actionscript calls the PHP form but dosen't post any information, it loads in the browser and I get the email but nothing in it?
    I'm just looking for the correct Actionscript to paste into flash and hopefully get it working. Thanks for the help.

  • Flash / PHP Contact Form

    Hello,
    I am setting up a flash site (well trying too)  and decided to get a Flash  template of Template Monster so I could work on it, I have the site up  and all but the contact form is not working properly. The problem is the Actionscript dosen't  seem to work with the contact.php file that came in the template pack and  when I contacted them it was of no help, I was just refered me to their help  pages which showed I just had to insert my email address after rec="??????" and it would work. The actionscript is;
    rec="[email protected]";
    serv="php";
    var fields_descriptions= Array ("",
    Array("t1", "your_name", "Your Name:"),
    Array("t2", "your_address", "Your Address:"),
    Array("t3", "phone", "Telephone:"),
    Array("t4", "message", "Message:"),
    Array("t5", "your_email", "E-mail:"),
    Array("t6", "field_3", "Address:"),
    Array("t7", "field_4", "fax:")
    function reset_txt(name,name2,value) {
    path=eval(_target);
    path[name2]=value;
    this[name].onSetFocus=function() {
    path=eval(_target);
    if(path[name2]==value) { path[name2]="";}
    this[name].onKillFocus=function() {
    path=eval(_target);
    if(path[name2]=="") { path[name2]=value;}
    for (i=1; i<=fields_descriptions.length; i++) {
    reset_txt("t"+i, fields_descriptions[i][1], fields_descriptions[i][2]);
    And the contact.php file has the following script;
    <?php
    $your_name = $_GET['your_name'];
    $your_address = $_GET['your_address'];
    $phone = $_GET['phone'];
    $your_email = $_GET['your_email'];
    $message = $_GET['message'];
    $headers .= 'Content-type: text/html; charset=iso-8859-1';
    $content = "<html><head><title>Contact letter</title></head><body><br>";
    $content .= "Company: <b>" . $your_company . "</b><br>";
    $content .= "Name: <b>" . $your_name . "</b><br>";
    $content .= "Phone: <b>" . $your_phone . "</b><br>";
    $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
    $content .= $your_message;
    $content .= "<br></body></html>";
    mail("[email protected]","New enquiry from website",$content,$headers);
    ?>
    <html>
    <body bgcolor="#282E2C">
    <div align="center" style="margin-top:80px;color:#FFFFFF;font-size:16px;font-family:Tahom a;font-weight:bold">
    Your message was sent to <br> East Coast Computer Services <br>We will be in contact with you soon. Thank you.
    </div>
    </body>
    </html>
    I do get email from the form in Outlook but the problem is it has no content just blank fields, see below:
    From: [email protected] [mailto:[email protected]]
    Sent: 24 March 2011 23:10
    To: [email protected]
    Subject: New enquiry from website
    Company:
    Name:
    Phone:
    E-mail:
    I  haven't got a breeze about Flash or PHP, I just know a small bit from  using Dreamweaver. Would you know what is preventing the form from  working, I know it something to do with Arrays but what do I change in the PHP file so I start to receive information in the contact form? Thank you in advance.
    Kevin

    kglad,
    The actionscript calls the PHP form but dosen't post any information, it loads in the browser and I get the email but nothing in it?
    I'm just looking for the correct Actionscript to paste into flash and hopefully get it working. Thanks for the help.

  • Flash Contact form with Php Error

    Hi again (".)
    I've making this contact form on flash & i got  the script  for the action script but i'm unable to integrate a php script that would send the mail from my form.
    I'm using two input feilds with instance names as theEmail and theMessage
    Would relly appreciate it if i culd get some help on it. thank you so much.
    Here is the action action script code i'm using -
    snd_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
              if (theEmail.text == "" || theMessage.text == "")
                        theFeedback.text = "Please fill in all fields.";
              else
                        // create a variable container
                        var allVars:URLVariables = new URLVariables();
                        allVars.email = theEmail.text;
                        allVars.message = theMessage.text;
                        //send info to a URL
                        var mailAddress:URLRequest = new URLRequest("mail.php");
                        mailAddress.data = allVars;
                        mailAddress.method = URLRequestMethod.POST;
                        sendToURL(mailAddress);
                        theFeedback.text = "Thank You!";
      theEmail.text = "";
                        theMessage.text = "";

    Actaully is i got this Action script from a tutorial and i learnt from it but the mail.php was not part of the tutorial.
    Would you be able to provide me a php script based on the instances names i mention above?

  • Php form data script

    Hi all
    would someone beable to help?
    I have been using a free php form data script on my website but I am finding that when people fill in the form that not all the form submissions are getting through and I am not sure if it is the php form script
    Would any one be to direct me to a good free php data script that is simple to use
    many thanks for your help!

    hi there
    many thanks for your help!
    ok, am  little new to this, so do you mean in my contact.php script I have?
    not sure what I would be looking for?
    I tried to attach to this post but copuld so zipped it for download here; http://www.thevineproject.org.uk/contact.zip
    thanks for your help

  • Php form processing script

    Hi. I got a program to write a php form processing script. My submit form is for photo submission to my domain email. I published to site and did a test to see if it works i got this error:
    Warning: require_once(F:\Domains\mydomain\mydomain.com\wwwroot/includes/Upload_Photos-lib.php): failed to open stream: No such file or directory in F:\Domains\mydomain\mydomain.com\wwwroot\Upload_Photos.php on line 24 Fatal error: require_once(): Failed opening required 'F:\Domains\mydomain\mydomain.com\wwwroot/includes/Upload_Photos-lib.php' (include_path='.;C:\php\pear') in F:\Domains\mydomain\mydomain.com\wwwroot\Upload_Photos.php on line 24
    What does this mean? How can i solve this so that i can process my form?

    See if the below form helps: You need to create a folder on your server named - upload - this is where any files uploaded will be stored (make sure the folder is writable. Also change the email address where the information that someone who has uploaded a file will go to. Look for the following in the code: $to ="XXXXXXXXXXXX.com";
    <!DOCTYPE html>
    <head>
    <meta charset="UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    #wrapper {
    width: 400px;
    margin: 0 auto;
    </style>
    </head>
    <body>
    <div id="wrapper">
    <?php if(isset($_POST['submit'])) {
    $name = trim($_POST['name']);
    if(empty($name)) {
    $error['name'] = "Please provide your name";
    $location = trim($_POST['location']);
    if(empty($location)) {
    $error['location'] = "Please provide your location";
    $email = trim($_POST['email']);
    if(empty($email)) {
    $error['email'] = "Please provide your email";
    $category_description = trim($_POST['category_description']);
    if(empty($category_description)) {
    $error['category_description'] = "Please provide the category or description";
    $terms_conditions = trim($_POST['terms_conditions']);
    if(empty($terms_conditions)) {
    $error['terms_conditions'] = "Please accept the terms & conditions";
    $allowedExts = array(
       "doc",
      "docx",
            "rtf",
            "txt",
            "pdf",
            "jpeg",
            "jpg",
    $allowedMimeTypes = array(
      'application/msword',
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
            'application/rtf',
            'application/x-rtf',
            'text/richtext',
            'text/rtf',
            'application/plain',
      'application/pdf',
      'image/gif',
      'image/jpeg',
    $extension = end(explode(".", $_FILES["file"]["name"]));
    if (empty($_FILES["file"]["name"])) {
        $selectFile = 'Please select a file to upload';
    elseif ( ! ( in_array($extension, $allowedExts ) ) ) {
      $fileTypeNotAllowed = 'File type not allowed';
    elseif ($_FILES["file"]["size"] > 2097152) {
      $fileTooLarge = 'Please provide a smaller file';
    elseif (file_exists("upload/" . $_FILES["file"]["name"])) {
    $fileExists = $_FILES["file"]["name"] . " already exists, Please change the file name ";
    elseif (in_array( $_FILES["file"]["type"], $allowedMimeTypes ) )
        if(!empty($_POST['terms_conditions'])) {
    move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]);
        $fileName = $_FILES["file"]["name"];
        $fileUploadSuccessful = 'File uploaded successfully';
    $to = "XXXXXXXXXXXXX.com";
    $subject   = "Upload to website";
    $headers  = "From: $email\r\n";
    $headers .= "Reply-To: $email\r\n";
    $message = "Name: $name\n\n";
    $message .= "Location: $location\n\n";
    $message .= "Email Address: $email\n\n";
    $message .= "Category/Description: $category_description\n\n";
    $message .= "File: $fileName\n\n";
    mail($to, $subject, $message, $headers);
    $sent = "Mail was sent successfully";
    ?>
    <h1>Form</h1>
    <?php
    foreach ($error as $value) {
        echo "<p>".$value."</p>";
    if(isset($formFieldError)) {
    echo "<p>".$formFieldError."</p>";
    if(isset($selectFile)) {
    echo "<p>".$selectFile."</p>";
    if(isset($fileTypeNotAllowed)) {
    echo "<p>".$fileTypeNotAllowed."</p>";
    if(isset($fileTooLarge)) {
    echo "<p>".$fileTooLarge."</p>";
    if(isset($fileExists)) {
    echo "<p>".$fileExists."</p>";
    if(isset($fileUploadSuccessful)) {
    echo "<p>".$fileUploadSuccessful."</p>";
    ?>
    <form action="upload_file.php" method="post"
    enctype="multipart/form-data">
    <p>
    <label for="name">Name<br>
    <input type="text" name="name" id="name" value="<?php if(isset($name)) {echo $name; }  ?>"/>
    </label>
    </p>
    <p>
    <label for="location">Location<br>
    <input type="text" name="location" id="location" value="<?php if(isset($location)) {echo $location; }  ?>"/>
    </label>
    </p>
    <p>
    <label for="email">Email<br>
    <input type="text" name="email" id="email" value="<?php if(isset($email)) {echo $email; }  ?>" />
    </label>
    </p>
    <p>
    <label for="category_description">Category and Description<br>
    <input type="text" name="category_description" id="category_description" value="<?php if(isset($category_description)) {echo $category_description; }  ?>" />
    </label>
    </p>
    <p>
    <label for="file">File Attachment:<br>
    <input type="file" name="file" id="file" />
    </label>
    </p>
    <p>
    <label for="terms_conditions">Terms & Conditions:
    <input name="terms_conditions" type="checkbox" value="accept" <?php if(isset($_POST['terms_conditions'])) {echo "checked"; }  ?>> (Please check)
    </label>
    </p>
    <input type="submit" name="submit" value="Submit" />
    </form>
    </div>
    </body>
    </html>

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

Maybe you are looking for