Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php feedback form not working!
Old 01-24-2007, 02:14 PM php feedback form not working!
Junior Talker

Posts: 4
Trades: 0
sorry about this very simple question, I am just learning how to use php to create a feedback form and no matter what i do, i don't recieve any emails.

here is the html file

Quote:
<html>
<head>
</head>
<body>
<form method="post" action="sendmail.php">
Email: <input name="email" type="text" /><br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea><br />
<input type="submit" />
</form>
</body>
</html>
and here is the php file : sendmail.php

<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "flowertreemom@yahoo.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>


i am using a subdomain under awardspace.com, and they say on their website that they provide php support, so I am not sure why it is not working...

Thanks a lot for your help!
flowertreemom is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-24-2007, 02:23 PM Re: php feedback form not working!
kreoton's Avatar
Extreme Talker

Posts: 194
Trades: 0
use $_POST instead of $_REQUEST, sometimes $_REQUEST gets only $_GET method values
__________________

Please login or register to view this content. Registration is FREE
|

Please login or register to view this content. Registration is FREE
kreoton is offline
Reply With Quote
View Public Profile Visit kreoton's homepage!
 
Old 01-24-2007, 02:34 PM Re: php feedback form not working!
Junior Talker

Posts: 4
Trades: 0
tried that, still no email...
how long should wait for the email to arrive?
flowertreemom is offline
Reply With Quote
View Public Profile
 
Old 01-24-2007, 02:51 PM Re: php feedback form not working!
kreoton's Avatar
Extreme Talker

Posts: 194
Trades: 0
do you get error?
__________________

Please login or register to view this content. Registration is FREE
|

Please login or register to view this content. Registration is FREE
kreoton is offline
Reply With Quote
View Public Profile Visit kreoton's homepage!
 
Old 01-24-2007, 03:22 PM Re: php feedback form not working!
Junior Talker

Posts: 4
Trades: 0
no errors at all... still no emails..
flowertreemom is offline
Reply With Quote
View Public Profile
 
Old 01-24-2007, 04:02 PM Re: php feedback form not working!
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
It could be that your host don't use the "new" superglobal arrays, but still the old one.

Rather than $_POST, try to use $HTTP_POST_VARS.
Or you could check in a phpinfo() page if the register_long_arrays directive is enabled.
Reference here:
http://www.php.net/manual/en/reserved.variables.php

It could be your problem, but in that case, it would be rather surprising from the hoster...
Why not PHP 3 then ?
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 01-24-2007 at 04:03 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-24-2007, 04:37 PM Re: php feedback form not working!
McBone's Avatar
Super Talker

Posts: 149
Name: i have left
Location: i have left
Trades: 0
awardspace do not offer the smtp required to send the forms!! niether do phpnet or ifastnet, in fact the only freespace with php and smtp i can think of is astralweb, but they have a banner across the top.

you need php and smtp for the emails to work
McBone is offline
Reply With Quote
View Public Profile
 
Old 01-24-2007, 04:43 PM Re: php feedback form not working!
Junior Talker

Posts: 4
Trades: 0
thanks, now that make sense!
flowertreemom is offline
Reply With Quote
View Public Profile
 
Old 01-24-2007, 04:49 PM Re: php feedback form not working!
McBone's Avatar
Super Talker

Posts: 149
Name: i have left
Location: i have left
Trades: 0
and i tested your form and it sends, but the email text doesn't appear, so i altered your code slightly and this works

PHP Code:

<?
$email 
$_POST["email"] ;
$message $_POST["message"] ;
mail"flowertreemom@yahoo.com""Feedback Form 

Results"
,
$message"From: $email);
header"Location: http://www.example.com/thankyou.html" );
?>
and the HTML codeis fine

Last edited by McBone; 01-25-2007 at 04:54 AM..
McBone is offline
Reply With Quote
View Public Profile
 
Old 11-17-2010, 09:22 PM Re: php feedback form not working!
Junior Talker

Posts: 1
Name: Not Likely
Trades: 0
I have this code in a php file for a 000webhost subdomain, practicefeedbackform.host22.com, and it does not work. it sends a message to my email, but the sender is "(unknown sender)", and all the message says is "to me", no matter what I put in the message area. just to make sure I'm being clear, this is the code I have:

<?
$email
= $_POST["email"
] ;
$message = $_POST["message"
] ;
mail( laxmaster1919@gmail,
"Feedback Form

Results"
,
$message, "From: $email"
);
header( "Location: thankyou.html"
);
?>
F**kYeah164 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php feedback form not working!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.52333 seconds with 12 queries