-
Hi,
this depends very much on the actual formmail
Musicman
-
Is it me or does it seem like there is no clear cut way to get things to work. Like everyone has their own method, because all of the solutions to this problem that I have read are different.
-
Hi,
the obvious solution is to identify all the vars that should be expected from the web, document them, and add code to actually pick them up. There are circumstances where just a general pattern is known (e.g. a variable del371 representing a checkbox with the meaning "delete id 371 from database"), and pickup code will use regex
However, if you are faced with the problem that your web host just upgraded, and you need your site up and running again as soon as possible, you would probably use one of the "collect all vars" methods
Also, not all servers are configured the same - so solutions might differ as well
Musicman
-
Originally posted by Musicman
you would probably use one of the "collect all vars" methods
Musicman [/B]
How do I collect all vars? I've never had any of my php scripts working 100% perfectly since the upgrade. The funny thing is the server company upgraded the server, but not to the specifications I asked for, and they work for me!
-
sybersnake! great post. It was so helpful to me. now I understand POST and what it does. I made a highScores thingy thanks to you! :-*
-
this trial version is expired
Thanks musicman
Had posted already a tread because of this problem. Should have read your
fine manual on dealing with te problem. Thanks, Musicman, you rock!?
-
This is my PHP-code
<?PHP
$to = "allpaxxx@online.no";
$subject = "RockCity post";
$message = "Name: " . $theName;
$message .= "\nEmail: " . $theEmail;
$message .= "\n\n Message: " .$theMessage;
$headers = "From: $theEmail";
$headers .= "\nReply-To: $theEmail";
$sentOk = mail($to, $subject, $message, $headers);
echo "sentOk= " . $sentOk;
?>
And this is my Flash code
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.theMessage = theMessage.text;
senderLoad.sendAndLoad("http://www.lillebo.org/send.php", receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
gotoAndStop("success");
}
else {
gotoAndStop("failed");
}
}
The problem is... I get the mail, but the mail contains none of the information it is supposed to contain :/ any suggestions?
Thank you!
Last edited by Tempesta; 03-06-2006 at 06:16 PM.
-
Hi,
you want to add something like
$theName = $_POST['theName'];
for all the vars you are sending.
You should further add the POST option to your sendandload call - sending mails via url parameters may make it appear in browser or server histories, and also is subject to size limits
Musicman
-
Ey thaaanks!
That actually worked perfectly I found a similar post by the maker of the tutorial I followed but he wrote;
$theName = $_POST[`theName`];
with some weird quotations and it didnt work.. imagine my frustration :P
but thanks, have a nice day!
-
Total Universe Mod
Didnt know if I should start a new thread but there was an upgrade to pHP releaseed on may 1st.
Im pretty sure my host has upgraded and Ive since been getting errors that my LoadVars cant find the php doc Im trying to sendAndLoad. Anyone else had any weird stuff happen?
-
Need Help with Flash Form/PHP
New Server uses: PHP Version 4.4.1
1 -- Flash Form used to work fine with the following code in my 'submit' button:
on (release) {
/:recipient = "info@mediashox.com";
/:subject = "feedback form from your site";
loadVariables ("formmail.php", "", "POST");
play ();
}
2 -- 'formmail.php' has been tested with another HTML form, and works fine.
Flash won't talk to the .php file. I am not getting the emails.
Tried a bunch of the other codes posted in this thread, can't get any of them to work either.
Is there a simple fix for the above button code?
Thanks very much
Healthy Earth - Healthy Mankind - A Joyous New Millennium
-
Hi,
Could you post a link to the actual site?
is that your php so you could edit it?
Musicman
-
Actual site: www.mediashox.com
Button to Form Mail: EMPLOYMENT
Yes, the PHP is mine, I can edit it.
I can upload .fla and .php if you're willing to look at it. I'm very grateful for the help, been trying to fix this for days now with no luck.
Thanks, Musicman!
Healthy Earth - Healthy Mankind - A Joyous New Millennium
-
imagination through stupidity
this thread is 4 years old, people keep on bringing it up. lol
Nothing to see here, move along.
-
That's coz it's a 'sticky' at the top of the forum category. I wonder what happened to Musicman, I thought he was helping me?
Healthy Earth - Healthy Mankind - A Joyous New Millennium
-
Hi,
right from the message that the server sends back to the browser:
Sorry, but I cannot figure out who sent you here. Your browser is not sending an HTTP_REFERER. This could be caused by a firewall or browser that removes the HTTP_REFERER from each HTTP request you submit.
For many years it was just internet exploder that did not send a referer along with flash requests (and hence made this kind of php script useless) - since a while Mozilla seems to duplicate that behaviour as well.
While referer check is a quite common way to add a bit of safety to formmail scripts, and more or less the only way for shared scripts (ones that a hosting company sets up for all their non-php users), it is fairly easy to trick these scripts and supply an acceptible referer, along with an arbitrary recipient (any many a spammer these days uses some website formmail to advertise their stuff)
Since it is your own script, dispose of the referer check, hardcode the recipient address in your script (so if someone tries to send to a test address it goes to your inbox insetad, and therefore is not useful for a spammer), and rather ensure that any field which goes into the mail header (the email as From: or Reply-To:, or the subject) is really one line
Musicman
-
Musicman, thank you very much for your explanation. When I said the PHP script was mine, I didn't mean 'mine', I just meant I had access to it, and could change it.
I believe my server / hosting company won't process PHP formmail unless it has the 'referrer' for spam reasons. However, I may be misunderstanding which 'referrer' you mean. I'm only vaguely familiar with PHP. Could you please look at my PHP code [below], and show me which 'referrer check' to dispose of and where to put the recipient address? I would very much appreciate your help. Thanks again...
<?PHP
define('VERSION','Classic v1.07.0');
define('MANUAL','http://www.boaddrink.com/projects/phpformmail/readme.php');
define('CHECK_REFERER', true);
// Variables sent from my Flash Form;
$corps=$name."\n".$admail."\n".$phone."\n".$referr ed."\n".$website."\n".$message."\n";
mail($recipient,$subject,$corps,"From: $admail\nReply-To:$admail\nX-Mailer: PHP/");
$referers = array('www.mediashox.com', 'mediashox.com', '208.106.175.228');
$valid_env = array('REMOTE_HOST', 'REMOTE_ADDR', 'REMOTE_USER', 'HTTP_USER_AGENT');
$recipient_array = array();
// +------------------------------------------------------------------------+
// | |
// | SMTP Modification by: CrystalTech Web Hosting Inc. |
// | Modified Date: 09.16.05 |
// | Modification approved for PHPFormMail Classic v1.07.0 |
// | |
// +------------------------------------------------------------------------+
// | |
// | Please enter a Valid Mail Server for your Email Recipient: |
// | If the recipient is you@yourdomain.com, then the SMTP server should |
// | be mail.yourdomain.com - For additional support, please email |
// | support@crystaltech.com |
// | |
// +------------------------------------------------------------------------+
// Please specify your Mail Server - Example: mail.yourdomain.com.
ini_set("SMTP","mail.mediashox.com");
// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.
ini_set("smtp_port","25");
// +------------------------------------------------------------------------+
// | STOP EDITING! The only two required variables that need to be updated |
// | are $referers and $valid_env |
// +------------------------------------------------------------------------+
Healthy Earth - Healthy Mankind - A Joyous New Millennium
-
Hi,
the line about CHECK_REFERER near the top seems to be a good place to change...
Now, about hardcoding recipient .... just go to the webpage listed in the MANUAL entry and read about the $recipient_array
Musicman
-
Musicman,
I changed the following:
1 -- define('CHECK_REFERER', false);
2 -- $recipient_array = array('fcf7b465cc30923b02a8cecc2ede239331c7990e' => 'info@mediashox.com', ' 2bd7df9fbc9f87040e617b5c09ad16aa85d73ecc ' => 'somebodyelse@example.com');
Both as per the MANUAL.
The form still does not work. I am not receiving the emails.
As stated earlier, the PHP file has been tested with an HTML form, and it works perfectly.
It seems that Flash will not talk to the PHP file.
Thanks
Healthy Earth - Healthy Mankind - A Joyous New Millennium
-
I have this code:
PHP Code:
<?php
mail("my@emailaddress.com", $subject, $message, "From: $fromname
Reply-To: $fromemail
X-Mailer: PHP/" . phpversion());
?>
which i believe needs to be fixed as register_globals is off on my server. Could someone let me know how to do this.
Thanks.
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
|