Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-24-2005, 10:35 PM   #1
sparky_hd
Member
 
Join Date: Apr 2004
Posts: 65
Default flash/php email form works on one server, not another

i am building a contact form for a website, based on the "Email 101" tut by CyanBlue at tutorials.flashvacuum.com, 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.
sparky_hd is offline   Reply With Quote
Old 07-25-2005, 12:22 AM   #2
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Howdy...

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???
PHP Code:
<?php
     mail
("[email protected]""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)
PHP Code:
<?php
     mail
("[email protected]"$_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...

Good luck...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 07-25-2005, 01:03 AM   #3
sparky_hd
Member
 
Join Date: Apr 2004
Posts: 65
Default

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/testmai...=customSubject

So i guess it didn't accept the variable.

PHPinfo is posted at: http://www.creativemyndz.com/info.php

Thanks for the help.
sparky_hd is offline   Reply With Quote
Old 07-25-2005, 02:27 AM   #4
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

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...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 07-25-2005, 02:55 AM   #5
sparky_hd
Member
 
Join Date: Apr 2004
Posts: 65
Default

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...
sparky_hd is offline   Reply With Quote
Old 07-25-2005, 03:03 AM   #6
sparky_hd
Member
 
Join Date: Apr 2004
Posts: 65
Default solved!

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.
sparky_hd is offline   Reply With Quote
Old 07-25-2005, 03:25 AM   #7
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Just what I thought... (Not that I really knew the solution... )

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...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:48 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.