Current location: Hot Scripts Forums » Programming Languages » PHP » Problem with email script


Problem with email script

Reply
  #1 (permalink)  
Old 04-05-06, 06:07 PM
sondogg's Avatar
sondogg sondogg is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Problem with email script

hey guys,

I've got a flash form that is sending variables name, email and comments via post method to my script.

It seems to be sending to the script but when I check the email it only has:

Name:
Email:
Comments:

but it doesn't display any of the variables. Here is my script:

PHP Code:

<?php

include ('./Connections/dbc.php'); //included for the escape_data function.

$name =  escape_data($_REQUEST['name']);
$email =  escape_data($_REQUEST['email']);
$comments =  escape_data($_REQUEST['comments']);

$body "Name:  " $name "\nEmail:  " $email "\nComments:  " $comments "\n";

mail('my_email_address''Comments from your site.'$body'From: my_email_address'); 
 
?>
Let me know if I'm doing something wrong or if there may be something wrong with my flash file.

Thanks

Sonny
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 04-05-06, 09:28 PM
Barnz1986 Barnz1986 is offline
Aspiring Coder
 
Join Date: Jan 2006
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by sondogg
hey guys,

I've got a flash form that is sending variables name, email and comments via post method to my script.

It seems to be sending to the script but when I check the email it only has:

Name:
Email:
Comments:

but it doesn't display any of the variables. Here is my script:

PHP Code:

<?php

include ('./Connections/dbc.php'); //included for the escape_data function.

$name =  escape_data($_REQUEST['name']);
$email =  escape_data($_REQUEST['email']);
$comments =  escape_data($_REQUEST['comments']);

$body "Name:  " $name "\nEmail:  " $email "\nComments:  " $comments "\n";

mail('my_email_address''Comments from your site.'$body'From: my_email_address'); 
 
?>
Let me know if I'm doing something wrong or if there may be something wrong with my flash file.

Thanks

Sonny
These areas might need to be $_POST instead of $_REQUEST.

Not $_REQUEST['name']

but $_POST['name'] etc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 04-05-06, 09:34 PM
sondogg's Avatar
sondogg sondogg is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks,

I ended up just redoing the flash form and the PHP altogether.

My problem is now solved...thanks again,

Sonny
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for YahooGroups-like email script maksum Script Requests 0 03-13-06 04:48 PM
Email Forwarding Script Makaveli19 Script Requests 2 03-06-06 09:46 AM
CGI Script Form to Email Help!!! EOM Perl 1 06-22-05 01:19 AM
Email to DB script radarman012000 ASP 1 09-17-04 02:57 PM
Form to email script with unique ID # webworx Script Requests 0 07-24-03 03:55 AM


All times are GMT -5. The time now is 12:21 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.