A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [RESOLVED] Sending Vars to PHP

  1. #1
    Member
    Join Date
    Nov 2003
    Location
    Ontario, Canada
    Posts
    80

    resolved [RESOLVED] Sending Vars to PHP

    I have the following in my F8 AS 2.0:

    PHP Code:
    getURL("email.php?sName=" _root.form.contactName.text +
                   
    "&subject=" _root.form.contactSubject.getSelectedItem().data +
                   
    "&email=" _root.form.contactEmail.text +
                   
    "&message=" _root.form.contactEmail.text,"_blank","POST"); 
    and this in my php:
    PHP Code:
    $name $_POST['sName'];
        
    $email $_POST['email'];
        
    $subject $_POST['subject'];
        
    $message $_POST['message"']; 
    but when I echo teh variable names, I get noghing.

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi.

    appending to the url is actually GET, sothings could work if you changed the php to use GET.
    You would be better off using a loadvars object instead of geturl, and setting vars on it
    mylv = new LoadVars();
    mylv.email = _root.form.contactEmail.text;
    ...
    mylv.send("email.php","_blank","POST");

    Musicman

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