RE: [Flashcoders] sending email as/php
your using POST to send the data - and then trying to retrieve with GET -Original Message- From: [EMAIL PROTECTED] on behalf of Lehr, Theodore M (N-SGIS) Sent: Mon 14/04/2008 16:29 To: Flash Coders List Subject: [Flashcoders] sending email as/php Sorry for posting such a basic but I did google first... I am trying: As: loadVariablesNum (mail.php, 0, POST); php: ?php $comment=$_GET['ucomment']; $name=$_GET['uname']; $email=$_GET['uemail']; mail([EMAIL PROTECTED], subject, Name: .$name.\nEmail: .$email.\n\nComment: .$comment); ? I am not getting the variable values... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] sending email as/php
hi Theodore Use $_POST if you're sending POST. Use $_GET when you're pulling variables out of the url, like index.php?id=980; I'd also recommend strip_tags(). $comment=strip_tags($_POST['ucomment']); And look up sql injection. Gabino - Original Message - From: Lehr, Theodore M (N-SGIS) [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, April 14, 2008 9:29 AM Subject: [Flashcoders] sending email as/php Sorry for posting such a basic but I did google first... I am trying: As: loadVariablesNum (mail.php, 0, POST); php: ?php $comment=$_GET['ucomment']; $name=$_GET['uname']; $email=$_GET['uemail']; mail([EMAIL PROTECTED], subject, Name: .$name.\nEmail: .$email.\n\nComment: .$comment); ? I am not getting the variable values... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] sending email as/php
Thanks for the response - but I am getting the same results -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabino Travassos Sent: Monday, April 14, 2008 12:00 PM To: Flash Coders List Subject: Re: [Flashcoders] sending email as/php hi Theodore Use $_POST if you're sending POST. Use $_GET when you're pulling variables out of the url, like index.php?id=980; I'd also recommend strip_tags(). $comment=strip_tags($_POST['ucomment']); And look up sql injection. Gabino - Original Message - From: Lehr, Theodore M (N-SGIS) [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, April 14, 2008 9:29 AM Subject: [Flashcoders] sending email as/php Sorry for posting such a basic but I did google first... I am trying: As: loadVariablesNum (mail.php, 0, POST); php: ?php $comment=$_GET['ucomment']; $name=$_GET['uname']; $email=$_GET['uemail']; mail([EMAIL PROTECTED], subject, Name: .$name.\nEmail: .$email.\n\nComment: .$comment); ? I am not getting the variable values... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] sending email as/php
You might also want to look up email injection too: http://en.wikipedia.org/wiki/Email_injection Gabino Travassos wrote: hi Theodore Use $_POST if you're sending POST. Use $_GET when you're pulling variables out of the url, like index.php?id=980; I'd also recommend strip_tags(). $comment=strip_tags($_POST['ucomment']); And look up sql injection. Gabino - Original Message - From: Lehr, Theodore M (N-SGIS) [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, April 14, 2008 9:29 AM Subject: [Flashcoders] sending email as/php Sorry for posting such a basic but I did google first... I am trying: As: loadVariablesNum (mail.php, 0, POST); php: ?php $comment=$_GET['ucomment']; $name=$_GET['uname']; $email=$_GET['uemail']; mail([EMAIL PROTECTED], subject, Name: .$name.\nEmail: .$email.\n\nComment: .$comment); ? I am not getting the variable values... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] sending email as/php
Same results if I: $comment=$_POST['ucomment']; $name=$_POST['uname']; $email=$_POST['uemail']; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pete Hotchkiss Sent: Monday, April 14, 2008 11:55 AM To: Flash Coders List; Flash Coders List Subject: RE: [Flashcoders] sending email as/php your using POST to send the data - and then trying to retrieve with GET -Original Message- From: [EMAIL PROTECTED] on behalf of Lehr, Theodore M (N-SGIS) Sent: Mon 14/04/2008 16:29 To: Flash Coders List Subject: [Flashcoders] sending email as/php Sorry for posting such a basic but I did google first... I am trying: As: loadVariablesNum (mail.php, 0, POST); php: ?php $comment=$_GET['ucomment']; $name=$_GET['uname']; $email=$_GET['uemail']; mail([EMAIL PROTECTED], subject, Name: .$name.\nEmail: .$email.\n\nComment: .$comment); ? I am not getting the variable values... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] sending email as/php
Hi, First try to load mail.php in the browser - if there are any errors in your code you will find out quickly... If there are no errors and it's still not working, try doing a basic HTML form to post to the page to test that part and then echo the variables back after the call to mail(): //not tested, but you should get the picture... $result = mail(...); echo comment= .$comment .amp;name= .$name .amp;email= .$email .amp;result= .((TRUE == $result) ? true : false); Then look at LiveHTTPHeaders for Firefox, or Service Capture / Charles proxy debuggers to see if Flash is sending the variables. Glen Glen Pike wrote: You might also want to look up email injection too: http://en.wikipedia.org/wiki/Email_injection Gabino Travassos wrote: hi Theodore Use $_POST if you're sending POST. Use $_GET when you're pulling variables out of the url, like index.php?id=980; I'd also recommend strip_tags(). $comment=strip_tags($_POST['ucomment']); And look up sql injection. Gabino - Original Message - From: Lehr, Theodore M (N-SGIS) [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, April 14, 2008 9:29 AM Subject: [Flashcoders] sending email as/php Sorry for posting such a basic but I did google first... I am trying: As: loadVariablesNum (mail.php, 0, POST); php: ?php $comment=$_GET['ucomment']; $name=$_GET['uname']; $email=$_GET['uemail']; mail([EMAIL PROTECTED], subject, Name: .$name.\nEmail: .$email.\n\nComment: .$comment); ? I am not getting the variable values... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] sending email as/php
In AS3, If you want to send an email, all you have to do is this: function sendData():void { ??? var variables:URLVariables = new URLVariables(); ??? variables.name = name_txt.text; ??? variables.email = email_txt.text; ??? variables.message = message_txt.text; ??? var _request:URLRequest = new URLRequest(mailer.php); ??? _request.data = variables; ??? _request.method = URLRequestMethod.POST; ??? var loader:URLLoader = new URLLoader(); ??? loader.dataFormat = URLLoaderDataFormat.TEXT; ??? loader.addEventListener( Event.COMPLETE, sendComplete ); ??? loader.load( _request ); } function sendComplete( e:Event ):void { ??? helpnotif_mc.helptip_txt.text = Message Sent! We will reply asap!; ??? helpnotif_mc.helptip_txt.textColor = 0x00ff00; } - PHP::: ?php /* mailer.php - version 1.0.1 */ /* creator - Jacob Relkin*/ /* Pull POST data from Flash */ $name = $_POST['name']; $email = $_POST['email']; /* Define html message */ $message = 'html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titlePHP E-Mail/title style type=text/css !-- body,td,th { ??? font-family: Verdana, Arial, Helvetica, sans-serif; ??? font-size: 16px; ??? color: #00FF00; } body { ??? background-color: #00; } -- /style/head body div align=center' . $_POST['message'] . '/div/body/html'; /* Title of the E-mail */ $subject? = PHPMessage; /* The e-mail address to send the message to. */ $toaddress = '[EMAIL PROTECTED]'; $name = trim($name); $email = trim($email); $subject = stripslashes($subject); $message = stripslashes($message); $headers = 'From: ' . $name . ' ' . $email . ''; $headers .= 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n; mail($toaddress, $subject, $message, $headers); ? If you have any questions, you can email me at [EMAIL PROTECTED] Jacob -Original Message- From: Lehr, Theodore M (N-SGIS) [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Mon, 14 Apr 2008 11:29 am Subject: [Flashcoders] sending email as/php Sorry for posting such a basic but I did google first... I am trying: As: loadVariablesNum (mail.php, 0, POST); php: ?php $comment=$_GET['ucomment']; $name=$_GET['uname']; $email=$_GET['uemail']; mail([EMAIL PROTECTED], subject, Name: .$name.\nEmail: .$email.\n\nComment: .$comment); ? I am not getting the variable values... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders