Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Web Hosting Services

Notices

Reply
 
Thread Tools
  #1  
Old 07-08-2008, 06:22 AM
cleanxhost's Avatar
cleanxhost cleanxhost is offline
Royal Croc
 
Join Date: Sep 2007
Location: Costa del Sol - Spain
Posts: 556
Question Help with Flash - PHP mail form

Hi,
I've been working on this for days and can't seem to get it to work properly, maybe someone here will understand my problem and give me a helping hand...

I downloaded a flash template and finally edited it how I wanted. It has a built in contact form which I had to edit a few things and created a contact.php file which I uploaded to my server in the same directory as the files for this site.

When I fill in the contact form and press the "submit" button, it works fine and I receive the e-mail in my inbox, but...

In the e-mail I only get the following text which is in the contact form, but do not get the details that I filled in:

First Name:

Surname:

E-Mail:

Telephone:

Location:

Ages of children:

Message:

Can anyone help me fix this problem?

Here is the code of my contact.php file:

<?php
$your_firstname = $GET['firstname'];
$your_surname = $GET['surname'];
$your_email = $GET['email'];
$your_telephone = $GET['telephone'];
$your_location = $GET['location'];
$your_agesofchildren = $GET['agesofchildren'];
$your_location = $GET['location'];
$recipient_email = "info@babysitting.com";
$subject = "Babysitting Form " . $your_email;
$headers = "From: " . $your_name . " <" . $your_email . ">\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1';
$content = "<html><head><title>Babysitting Form</title></head><body><br>";
$content .= "First Name: <br>" . $your_firstname . "</b><br>";
$content .= "Surname: <br>" . $your_surname . "</b><br>";
$content .= "E-Mail: <br>" . $your_email . "</b><br>";
$content .= "Telephone: <br>" . $your_telephone . "</b><br><hr><br>";
$content .= "Location: <br>" . $your_location . "</b><br><hr><br>";
$content .= "Ages of children: <br>" . $your_agesofchildren . "</b><br><hr><br>";
$content .= $your_message;
$content .= "<br></body><html>";
mail($recipient_email,$subject,$content,$headers);
?>
<html>
<body bgcolor=#282E2C">
<div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
Your message was successfully sent!
</div>
</body>
</html>
<script>resizeTo(300, 300)</script>

I'm not sure if it's a problem with the contact.php file or if I missed something out on the flash contact form.

Hope someone will be able to help me on this one as I've been trying for a day to figure this out and it's my very first website in flash.

__________________
A REAL man loves his woman every day of the month
http://www.piclikes.com/like/444
Green Cigs
http://www.greencigs.info
Reply With Quote
  #2  
Old 07-08-2008, 09:12 AM
regentronique's Avatar
regentronique regentronique is offline
King Croc
 
Join Date: Aug 2007
Location: Quebec,Canada
Posts: 969
Default Re: Help with Flash - PHP mail form

It looks that you forgot the underscore before the GET it should be $_GET not $GET.

Just in case, to know if you at least receive the data just write after the "<?php":

PHP Code:
print "Results received with GET:<br>";
print_r($_GET);
print 
"Results received with POST:<br>";
print_r($_POST);
exit; 
It will print out what you should receive in arrays.
Reply With Quote
  #3  
Old 07-08-2008, 10:23 AM
eLIANT eLIANT is offline
King Croc
 
Join Date: Apr 2005
Posts: 1,075
Default Re: Help with Flash - PHP mail form

When calling contact.php with the GET method, you must include variable names and values in your call.

Like this:
Code:
$url = "contact.php?firstname=Davey&surname=Jones&etc";
Header ( "Location: $url");
__________________

eLIANT Technology Services
(site feedback welcome)
Reply With Quote
  #4  
Old 07-08-2008, 03:24 PM
cleanxhost's Avatar
cleanxhost cleanxhost is offline
Royal Croc
 
Join Date: Sep 2007
Location: Costa del Sol - Spain
Posts: 556
Default Re: Help with Flash - PHP mail form

Quote:
Originally Posted by regentronique View Post
It looks that you forgot the underscore before the GET it should be $_GET not $GET.

Just in case, to know if you at least receive the data just write after the "<?php":

PHP Code:
print "Results received with GET:<br>";
print_r($_GET);
print 
"Results received with POST:<br>";
print_r($_POST);
exit; 
It will print out what you should receive in arrays.
.................................................. .......................

Still no luck...

Have added the underscore but no luck.

Have added that bit of code and this is what I get:

Results received with GET:
Array ( [firstname] => First Name [surname] => Surname [email] => E-Mail [telephone] => Telephone [location] => Location [agesofchildren] => Ages of children [message] => Message ) Results received with POST:
Array ( )

Maybe it's a fault with the coding on the flash website.
I have added it below to see if it seems ok or if there is something missing. This is the code for the submit button:

on(rollOver){b2.gotoAndPlay(2);
}
on(rollOut, releaseOutside){b2.gotoAndPlay(9);
}
on (release) {
_parent.getURL("contact.php","_blank","GET");
_parent.firstname= "First Name";
_parent.surname= "Surname";
_parent.email= "E-Mail";
_parent.telephone= "Telephone";
_parent.location= "Location";
_parent.agesofchildren= "Ages of children";
_parent.message= "Message";
}

__________________
A REAL man loves his woman every day of the month
http://www.piclikes.com/like/444
Green Cigs
http://www.greencigs.info
Reply With Quote
  #5  
Old 07-08-2008, 06:31 PM
regentronique's Avatar
regentronique regentronique is offline
King Croc
 
Join Date: Aug 2007
Location: Quebec,Canada
Posts: 969
Default Re: Help with Flash - PHP mail form

Quote:
Originally Posted by cleanxhost View Post
.................................................. .......................

Still no luck...

Have added the underscore but no luck.

Have added that bit of code and this is what I get:

Results received with GET:
Array ( [firstname] => First Name [surname] => Surname [email] => E-Mail [telephone] => Telephone [location] => Location [agesofchildren] => Ages of children [message] => Message ) Results received with POST:
Array ( )

Maybe it's a fault with the coding on the flash website.
I have added it below to see if it seems ok or if there is something missing. This is the code for the submit button:

on(rollOver){b2.gotoAndPlay(2);
}
on(rollOut, releaseOutside){b2.gotoAndPlay(9);
}
on (release) {
_parent.getURL("contact.php","_blank","GET");
_parent.firstname= "First Name";
_parent.surname= "Surname";
_parent.email= "E-Mail";
_parent.telephone= "Telephone";
_parent.location= "Location";
_parent.agesofchildren= "Ages of children";
_parent.message= "Message";
}

You are assigning the textual values yourself, instead of getting the values entered by the contact form. It is just normal that you always receive the same thing each time!

Use your contact form values instead...
Reply With Quote
  #6  
Old 07-09-2008, 05:32 AM
cleanxhost's Avatar
cleanxhost cleanxhost is offline
Royal Croc
 
Join Date: Sep 2007
Location: Costa del Sol - Spain
Posts: 556
Default Re: Help with Flash - PHP mail form

I'm really banging my head now...

What do the "contact form values" look like? Are they single letters like a,b,c,etc?

Do I also have to change them in the "contact.php" script?

This is getting really hard but I want to learn how to do this.

for your help.
__________________
A REAL man loves his woman every day of the month
http://www.piclikes.com/like/444
Green Cigs
http://www.greencigs.info
Reply With Quote
  #7  
Old 07-09-2008, 12:23 PM
regentronique's Avatar
regentronique regentronique is offline
King Croc
 
Join Date: Aug 2007
Location: Quebec,Canada
Posts: 969
Default Re: Help with Flash - PHP mail form

For more accurate answers you would need to post the entire flash script to be able to know the real fields name and troubleshoot more...

From what i see the fields you are filling with your data are not the ones sent.
Reply With Quote
  #8  
Old 07-09-2008, 04:16 PM
cleanxhost's Avatar
cleanxhost cleanxhost is offline
Royal Croc
 
Join Date: Sep 2007
Location: Costa del Sol - Spain
Posts: 556
Default Re: Help with Flash - PHP mail form

Hello again Regentronique,

I really appreciate your time trying to help me with my problem, I have added a link after this text with the info that you specified above.
Many thanks once again for taking the time to help me.

Here is the link to my files:
http://www.rosamaribaby-sitting.com/...NGTESTSITE.rar

__________________
A REAL man loves his woman every day of the month
http://www.piclikes.com/like/444
Green Cigs
http://www.greencigs.info
Reply With Quote
  #9  
Old 07-22-2008, 06:09 PM
cleanxhost's Avatar
cleanxhost cleanxhost is offline
Royal Croc
 
Join Date: Sep 2007
Location: Costa del Sol - Spain
Posts: 556
Default Re: Help with Flash - PHP mail form

OK, I give up with this, just haven't got the time to try anything else to fix this problem, I have tried and got it to sort of work, but now I'm missing the popup message that says" your form has been sent succesfully"....

So... I can't remember the web address, but someone here has got to know it, it's a place where you post the job that you want done, put a price and people bid or something like that...

Can someone please give me the URL of this website... before I go crazyyyyyyyyyyyy...

Best Regards and thankyou for trying to help me out on this one
__________________
A REAL man loves his woman every day of the month
http://www.piclikes.com/like/444
Green Cigs
http://www.greencigs.info
Reply With Quote
  #10  
Old 07-23-2008, 12:32 AM
hostcurry hostcurry is offline
Hatchling Croc
 
Join Date: Apr 2007
Posts: 16
Default Re: Help with Flash - PHP mail form

look at http://forums.digitalpoint.com/forumdisplay.php?f=103 for help
Reply With Quote
  #11  
Old 07-23-2008, 10:33 AM
regentronique's Avatar
regentronique regentronique is offline
King Croc
 
Join Date: Aug 2007
Location: Quebec,Canada
Posts: 969
Default Re: Help with Flash - PHP mail form

Quote:
Originally Posted by cleanxhost View Post
OK, I give up with this, just haven't got the time to try anything else to fix this problem, I have tried and got it to sort of work, but now I'm missing the popup message that says" your form has been sent succesfully"....

So... I can't remember the web address, but someone here has got to know it, it's a place where you post the job that you want done, put a price and people bid or something like that...

Can someone please give me the URL of this website... before I go crazyyyyyyyyyyyy...

Best Regards and thankyou for trying to help me out on this one
Is it RentACoder.com you are looking for?
Reply With Quote
  #12  
Old 07-23-2008, 03:20 PM
cleanxhost's Avatar
cleanxhost cleanxhost is offline
Royal Croc
 
Join Date: Sep 2007
Location: Costa del Sol - Spain
Posts: 556
Default Re: Help with Flash - PHP mail form

Thanks very much again regentronique, that's exactly the one that I was looking for!

Thanks for the other link hostcurry but I had that forum already in my bookmarks, but the problem with that forum is that they don't let you post straight away after signing up, I think you have to wait a week or so...

__________________
A REAL man loves his woman every day of the month
http://www.piclikes.com/like/444
Green Cigs
http://www.greencigs.info
Reply With Quote
Reply

Bookmarks

Thread Tools

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make mail form one? OneManShow Web Hosting Services 8 07-09-2008 08:23 AM
PHP and mail of form steph Shared Hosting Support 5 01-21-2008 06:36 AM
Form Mail Encrypting fcds Suggestions 1 09-13-2007 01:29 PM

All times are GMT -5. The time now is 03:51 AM.