|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Flash vars into PHP ???
Got this form and PHP backend. all the variable names are set properly etc and the script runs successfully. I get an email, but the spaces where the variables should be are blank. I have set it up to work with an html form and everything works perfectly. but for some reason flash isnt passing the variables into the php.
any ideas?? This is the script <? $ToEmail = "me@me.com"; $ToName = "Me"; $ToSubject = "Mail"; $EmailBody = "Sent By: $FirstNamenSenders Email: $EmailnnMessageSent:n$ToCommentsnn"; $EmailFooter="nThis message was sent by: $FirstName from $REMOTE_ADDR If you feel that you recieved this e-mail by accident please contact us at www.yourSite.com"; $Message = $EmailBody.$EmailFooter; mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FirstName." <".$Email.">"); Print "_root.contact_form.form_fields.EmailStatus=Complet e - Your mail has been sent"; ?> and this is on the button on (release) { if (_root.contact_form.form_fields.FirstName eq "") { EmailStatus = "Please Enter your name"; } else if (!_root.contact_form.form_fields.Email.length || _root.contact_form.form_fields.Email.indexOf("@") == -1 ||_root.contact_form.form_fields.Email.indexOf(".") == -1) { EmailStatus = "Please enter a valid e-mail address"; } else if (_root.contact_form.form_fields.ToComments eq "") { EmailStatus = "Please enter a message"; } else { loadVariablesNum ("fumemail.php", 0, "POST"); EmailStatus = "Sending... one moment please"; } } cheers in advance djangokill www.fumelondon.fsnet.co.uk |
|
#2
|
|||
|
|||
|
RE: Flash vars into PHP ???
Hmm..everything looks ok there. The first thing I would suggest doing is using $HTTP_POST_VARS instead of just the var names...try this for your php and see if it works:
<? $ToEmail = "me@me.com"; $ToName = "Me"; $ToSubject = "Mail"; $EmailBody = "Sent By: ".$HTTP_POST_VARS['FirstName']."nSenders Email: ".$HTTP_POST_VARS['Email']."nnMessageSent:n".$HTTP_POST_VARS['ToComments']."nn"; $EmailFooter="nThis message was sent by: ".$HTTP_POST_VARS['FirstName']." from ".$REMOTE_ADDR." If you feel that you recieved this e-mail by accident please contact us at www.yourSite.com"; $Message = $EmailBody.$EmailFooter; mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$HTTP_POST_VARS['FirstName']." <".$HTTP_POST_VARS['Email'].">"); Print "_root.contact_form.form_fields.EmailStatus=Complet e - Your mail has been sent"; ?> Let me know how that goes! |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Flash vars into PHP ??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|