PHP and Flash Form help

Reply

Join Date: Dec 2008
Posts: 1
Reputation: Animosity is an unknown quantity at this point 
Solved Threads: 0
Animosity Animosity is offline Offline
Newbie Poster

PHP and Flash Form help

 
0
  #1
Dec 24th, 2008
Well, I got this from a tutorial across the web and I saw a post from this website concerning with what I had. Though nothing works, I'm trying to see what can I do to have the content simply send in and flow though.
Flash:
actionscript Syntax (Toggle Plain Text)
  1. stop();
  2. System.useCodepage = true;
  3. send_btn.onRelease = function() {
  4. my_vars = new LoadVars();
  5. my_vars.sender = email_box.text;
  6. my_vars.subject = subject_box.text;
  7. my_vars.name = name_box.text;
  8. my_vars.email = email_box.text;
  9. my_vars.company = company_box.text;
  10. my_vars.address = address_box.text;
  11. my_vars.csz = csz_box.text;
  12. my_vars.phone = phone_box.text;
  13. my_vars.fax = fax_box.text;
  14. my_vars.part = part_box.text;
  15.  
  16. if (my_vars.sender != "" and my_vars.subject != "" and my_vars.part != "") {
  17. my_vars.sendAndLoad("http://kerneng.com/flash/mailer.php", my_vars, "POST");
  18. gotoAndStop(2);
  19. } else {
  20. error_clip.gotoAndPlay(2);
  21. }
  22. my_vars.onLoad = function() {
  23. gotoAndStop(3);
  24. };
  25. };
  26. email_box.onSetFocus = subject_box.onSetFocus=part_box.onSetFocus=function () {
  27. if (error_clip._currentframe != 1) {
  28. error_clip.gotoAndPlay(6);
  29. }
  30. };


Heres the PHP Script, i'm trying to get content from

  1. <?php
  2.  
  3. /* ---------------------------
  4. php and flash contact form.
  5. by www.MacromediaHelp.com
  6. ---------------------------
  7. Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server,
  8. so make sure your email (on last line of this file) is one hosted on same server.
  9. --------------------------- */
  10.  
  11.  
  12. // read the variables form the string, (this is not needed with some servers).
  13. $subject = $_REQUEST["subject"];
  14. $sender = $_REQUEST["sender"];
  15. $name = $_REQUEST["name"];
  16. $email = $_REQUEST["email"];
  17. $company = $_REQUEST["company"];
  18. $address = $_REQUEST["address"];
  19. $csz = $_REQUEST["csz"];
  20. $phone = $_REQUEST["phone"];
  21. $fax = $_REQUEST["fax"];
  22. $part = $_REQUEST["part"];
  23.  
  24.  
  25.  
  26. // include sender IP in the message.
  27. $full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . '$name'. "\n\n" . '$email' . "\n\n" . '$company' . "\n\n" . '$address' . "\n\n" . '$csz' . "\n\n" . '$phone' . "\n\n" . '$fax' . "\n\n" .' $part'
  28. $message = $full_message;
  29.  
  30. // remove the backslashes that normally appears when entering " or '
  31. $message = stripslashes($message);
  32. $subject = stripslashes($subject);
  33. $sender = stripslashes($sender);
  34.  
  35. // add a prefix in the subject line so that you know the email was sent by online form
  36. $subject = $subject;
  37.  
  38. // send the email, make sure you replace email@yourserver.com with your email address
  39. if(isset($message) and isset($subject) and isset($sender)){
  40. mail("gundamdeviL@hotmail.com", $subject, $message, "From: $sender");
  41. }
  42. ?>
Last edited by Animosity; Dec 24th, 2008 at 10:43 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC