A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [CS3] flash input form

  1. #1
    Member
    Join Date
    Oct 2003
    Posts
    73

    [CS3] flash input form

    Hey I was hoping someone could explain to me how php interacts with flash when I am trying to get an input form to work? Do I need php to get my form to work and if yes, why do I need it? I have a brinkster account, do I need to write the php code myself? If someone could help me that would be great. Also if there is a way where I can do all the form work in actionscript without worrying about writing php that would be even better.

    Thanks

  2. #2
    Member
    Join Date
    May 2003
    Location
    Florida
    Posts
    90
    if you're trying to get data from a database or send data out to an email or a database, you will need to have a php script handling it in the backend.
    as far as loading data back and forth, look up loadVars

    to just get input in flash and keep it in flash (meaning no interaction with a database or email...) you can just use textfields set to input.
    visit my portfolio and sign my guestbook!!

  3. #3
    Member
    Join Date
    Oct 2003
    Posts
    73
    thanks man. I am looking at php email code. I have the basic code put up and it is still not working though. heres the php code

    <?php
    $sendTo = "germy104@yahoo.com";
    $subject = "My Flash site reply";


    $headers = "From: " . $_POST["name"];
    $headers .= "<" . $_POST["email"] . ">\r\n";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $headers .= "Return-Path: " . $_POST["email"];
    $message = $_POST["comments"];


    mail($sendTo, $subject, $comments, $headers);
    ?>


    heres the flash code

    onClipEvent(data){

    _root.nextFrame();

    }
    this code is one my input form text

    my submit button looks like this

    on (release) {
    form.loadVariables("email.php", "POST");
    }
    do you see anything wrong?

  4. #4
    Member
    Join Date
    May 2003
    Location
    Florida
    Posts
    90
    what you are doing with loadVariables("url") is running that script... but you are not sending it anything.
    use it like: loadVariables("email.php?comments=whatever");

    then you will get the comments through GET to your php script.
    also you may wanty to double check that your server allows email sending... some hosts need to be set up before that's allowed.
    besides that try dropping the additional headers and have a simple mailto
    mailto(who, subject, message) it might be your headers throwing your script off.
    visit my portfolio and sign my guestbook!!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center