php form mail inside the flash

Reply

Join Date: Oct 2008
Posts: 14
Reputation: mhangman is an unknown quantity at this point 
Solved Threads: 0
mhangman mhangman is offline Offline
Newbie Poster

php form mail inside the flash

 
0
  #1
Oct 16th, 2008
hi im trying to make a flash web page. im using a free template for starting. it has a contact form but when i try to use it just not working. where am i making mistake can any1 tell me?i dont know as well so just c/p what i saw in file

my php file

  1. <?php
  2.  
  3. include("protect.php");
  4.  
  5. $contact_name = $_POST['name'];
  6. $contact_email = $_POST['email'];
  7. $contact_subject = $_POST['subject'];
  8. $contact_message = $_POST['message'];
  9.  
  10. if( $contact_name == true )
  11. {
  12. $sender = $contact_email;
  13. $receiver = "xxxxxx@gmail.com";
  14. $client_ip = $_SERVER['REMOTE_ADDR'];
  15. $email_body = "Name: $contact_name \nEmail: $sender \nSubject: $contact_subject \nMessage: $contact_message \nIP: $client_ip \nFlash Contact Form provided by http://www.flashmo.com";
  16. $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
  17.  
  18. if( mail( $receiver, "Flash Contact Form - $contact_subject", $email_body, $extra ) )
  19. {
  20. echo "success=yes";
  21. }
  22. else
  23. {
  24. echo "success=no";
  25. }
  26. }
  27. ?>

frame 1

  1. send_button.onRelease = submit;
  2. reset_button.onRelease = reset;
  3. function submit()
  4. {
  5. if( contact_name.text == "" || contact_email.text == "" ||
  6. contact_subject.text == "" || contact_message.text == "" )
  7. {
  8. message_status.text = "Lütfen tüm alanları doldurun.";
  9. }
  10. else if( contact_email.text.indexOf('@') < 2 || contact_email.text.indexOf('.') < 0 )
  11. {
  12. message_status.text = "Lütfen geçerli bir e-mail adresi girin.";
  13. }
  14. else
  15. {
  16. message_status.text = "";
  17. gotoAndStop("send");
  18. }
  19. }
  20. function reset()
  21. {
  22. contact_name.text = contact_email.text = contact_subject.text =
  23. contact_message.text = message_status.text = "";
  24. clearInterval(interval_id);
  25. gotoAndStop("stop");
  26. }

and send frame

  1. stop();
  2. loadVariables("send_email.php?flashmo=" + random(1000), this, "POST");
  3. message_status.text = "yollaniyor...";
  4. var i = 0;
  5. function check_status()
  6. {
  7. if( success == "yes" )
  8. {
  9. message_status.text = "Mesajınız yollandı!";
  10. play();
  11. }
  12. else if( success == "no" )
  13. {
  14. message_status.text = "Mesajınız yollanamadı lütfen tekrar deneyin.";
  15. gotoAndStop("stop");;
  16. }
  17. if( i >= 20 )
  18. clearInterval(interval_id);
  19. i++;
  20. }
  21. var interval_id = setInterval(check_status, 400);
Reply With Quote Quick reply to this message  
Reply

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



Other Threads in the PHP Forum
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC