View Full Version : flash/php email form works on one server, not another
07-24-2005, 10:35 PM
i am building a contact form for a website, based on the "Email 101" tut by CyanBlue at tutorials.flashvacuum.com (http://tutorials.flashvacuum.com/tutorials/Flash%20&%20PHP%20Integration/Email101/), and had troubles when Flash would send variables to the PHP code. After trying a few things, i just posted the original tutorial files on the server and had the same problem. i posted the same files on my personal server and the script ran well - an email was sent.
The problem server is running PHP 4.0.6. Are there known issues with this version of PHP and the code from the tutorial? i'm not sure how to adjust my code so it works on this server.
07-25-2005, 12:22 AM
Hm... Interesting... I have not really tested that script on PHP 4.0.6 and I honestly do not know what might be causing that...
I don't know how much I can help, but let's see if I can help you...
The first question I have is if you can send an email from your host...
Can you run this script from the server(http://www.domain.com/testmail.php from the IE) and see if you can email???
", "Test email", "Test email from the host");
If you get the email, try this from the server((http://www.domain.com/testmail.php?subject=some subject from the IE)
", $_GET['subject'], "Test email from the host");
Tell me how it goes... and see if you can post the phpinfo information on your host so that we can check it out... ;)
07-25-2005, 01:03 AM
CyanBlue- sorry for the few emails that you'll receive from the test script. i forgot to change the email adress when i tried the second one!
Well, the results are: the first script resulted in a successfylly sent email, and the second script sent the email but didn't include a subject.
To make sure i called it correctly, this is what i typed: http://www.creativemyndz.com/testmail.php?subject=customSubject
So i guess it didn't accept the variable.
PHPinfo is posted at: http://www.creativemyndz.com/info.php
Thanks for the help.
07-25-2005, 02:27 AM
Hm... I am not sure if I was getting you right or not...
Did you say that you were getting NO email when tested on your server or did you say that you were getting the emails but the variables were blank???
In the tutorial, I am referring the variables with $_POST like $_POST['name'], why don't you try using either $name or $HTTP_POST_VARS['name'] instead and see if that makes any difference???
On another note, I personally don't think it is wise to say with the host which has PHP 4.0.6... It's like staying with F5 when we are about to have the next version of the FMX 2004... Lot have been changed in terms of the security and what other functionalities... Ask your host to get the newer version or possibly find another host with better deal... That's my 2 cents... ;)
07-25-2005, 02:55 AM
OK, to clarify:
The server can send emails (the first script of your first post was successful), but when i tried to pass the subject into the email (using the second script of your first post), the email was received without any subject. So the variable was left blank.
Now, the original problem, was that no email was being sent at all via the script/ActionScript used in the "Email 101" tutorial.
So now we know that the server can send emails, but is having trouble receiving the variable. Right?
Now, i'll check into your latest suggestions...
07-25-2005, 03:03 AM
Well, the $HTTP_POST_VARS method made all the difference. Everything is working now. Thanks a lot for your help, CyanBlue.
btw- i'll will pass your suggestions regarding hosting along to my client... thanks.
07-25-2005, 03:25 AM
Just what I thought... (Not that I really knew the solution... :D)
Yeah... I don't see that it is really an urgent thing to do since you've got it working, but I think that's whole lot better that way when they need to renew the hosting contract... ;)
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.