Hi, I am passing two values from Flash to PHP. PHP script sends the two values to a mail id. This works perfect. But when I am trying to echo those two values it is not working at all. Here is the script <?php if ($_POST) { $mailTo = "demo@agp.com"; $mailSubject = "User Statistics [Mp3 Gallery]"; $Header = "MIME-Version: 1.0\r\n"; $Header .= "Content-type: text/html; charset=iso-8859-1\r\n"; $output = "<BR>"; $output .= "Action : " . $_POST['action'] . "<BR><BR>"; $output .= "Song : " . $_POST['song'] . "<BR><BR>"; $output = nl2br($output); if (mail($mailTo, $mailSubject, stripslashes($output), $Header)) { echo("&result=1&"); } else { echo("&result=2&"); } } else { echo("This script runs only in Flash!!!"); } ?> Action : <?php echo $_POST["action"]; ?><br /> Song : <?php echo $_POST["song"]; ?> PHP: All working perfect except the last two lines where I am trying to echo the values. Please help me guys, I know nothing in PHP, Im a Flash developer. lol
Action : <?php echo $_POST["action"]; ?><br /> Song : <?php echo $_POST["song"]; ?> PHP: TRy Action : <?php echo $_REQUEST["action"]; ?><br /> Song : <?php echo $_REQUEST["song"]; ?> PHP: or Action : <?php echo $_GET["action"]; ?><br /> Song : <?php echo $_GET["song"]; ?> PHP:
Where is the values of $_POST["action"] and $_POST["song"] come from? Maybe you can post here the html form part here and let us have a look
Hi, It is from Flash Action Script. It is Action Script 2. Here it is : function sendValues() { email_lv = new LoadVars(); email_lv.action = action; email_lv.song = description_txt; trace(action); trace(description_txt); email_lv.onLoad = function(ok) { if (ok) { trace("Email Sent!!!"); trace(unescape(this)); } else { trace("Problem sending an Email!!!"); } }; email_lv.sendAndLoad("contents/userstats.php", email_lv, "POST"); } sendValues(); Code (markup):
if you want to do an echo to a $_POST var <?php if(isset($_POST['submit'])) { $nume = $_POST['nume']; } echo "$nume"; // This Should Work ?> Code (markup):