|
-
LoadVars.send() not working
i have been able to get this to work using the geturl() but not with the loadvars object. trace prints what i would expect to see.
here is the code in my flash button.
code:
on (release) {
submit = new LoadVars();
submit.returnAddress = txt1.text;
submit.messageBody = txt2.text;
if (submit.returnAddress.length && submit.returnAddress.indexOf("@") != -1 && submit.returnAddress.indexOf(".") != -1 && submit.messageBody.length) {
sumbit.send("http://www.webaddresshere.com/submit.php","_blank","POST");
trace(submit);
}
}
and my php
PHP Code:
<?php
$toAddress="[email protected]";
$subject="Message From Website";
$returnAddress=$HTTP_POST_VARS[returnAddress];
$message=$HTTP_POST_VARS[messageBody];
mail($toAddress, $subject, $message, "From:$returnAddress\r\n");
?>
Last edited by jbum; 10-08-2004 at 03:09 PM.
-
Senior Member
Looks like you mispelled 'submit' at least once - check out the next to last line.
-
still another problem.
thank you for catching that.
I can't get this to work using a post method, it seems to only want to use get. is there anything else i need to do to get it to use post?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|