Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Sending Variables from Flash to PHP

Guest
Nov 19, 2014 Nov 19, 2014

This is Probably going to be easy for you guys , I am New to AS3 so not for me Need your help at every step Folks

Here is my Script in AS3

var request:URLRequest = new URLRequest("http://valeurtechnologies.com/fmg/mail.php");
   var ldr_email:URLLoader = new URLLoader();
  
   var variables:URLVariables = new URLVariables();
  
   variables.subject = "Email from FMG Induction Portal";
  
  

   var str_message:String = "";
   str_message += "Name: Name";

   str_message += ("\nEmail:"+mc_popupEmail.txt_email.text);
   str_message += ("\nNumber of Correct Answers:"+cor_ans.text);
   str_message += ("\nNumber of Incorrect Answers:"+incor_ans.text);
   str_message += ("\nDate of Test:" + _dateTF.text);
   str_message += ("\nDuration of Test:"+_durationTF.text);

  
   variables.Message = str_message;

   request.data = variables;
  
   request.method = URLRequestMethod.POST;
  
   ldr_email.load(request);
  
   txt_status.text = "Result has been sent";
  
   txt_comments.text = "";

-----------------------------------------------------

My PHP is even worst than AS3 , so need your assistance in writing the right Script.

Here is what I got , see its very Basic

<?php

$text=$_POST['str_message']." ".$_POST['mc_popupEmail.txt_email'];

$to="umer.b4u@gmail.com";

$subject="Message from php";

mail($to,$subject,$text,"Content-Type: text/plain; charset=utf-8");

echo $text;

?>

Can you tell me how can I pass those Variables in so that the email I get shows the Content of the Variables in it

Once again , I know newbies are very Annoying , but I request you to be patient with me on dumb questions

Can I say , PLEASE HELP

TOPICS
ActionScript
224
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 19, 2014 Nov 19, 2014
LATEST

AS3: Contact Form

this is a great walk thru on how to get this done

Hope it helps

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines