I have got my apache 2.2 and php working no problem to deal with .php files
i'm trying to do a simple feedbackform from the tutorial i'm doing
I have set php.ini with the following lines
[mail function]
SMTP = mail.talktalk.net
smtp_port = 25
sendmail_from = "myemail"@talktalk.net
i have 3 basic files
feedback.html wich puts up an email box and message box and subit button
sendmail.php which is coded as follows
<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "myemail@talktalk.net", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://localhost/basic/thankyou.html" );
?>
and a simple thanx for the thankyou.html
"NOTE: i have changed myemail and left the talktlak prt in so i don't recieve masses of junkmail"
Now when i send the feedback form i get the tankyou screen but recive non of the test emails. anyone got any ideas where i'm going wrong
Thnax all
Sendmail.php on testserver
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Sendmail.php on testserver
Remove the header redirect, and see if you get errors. Make sure you have errors enabled in your php.ini.
Re: Sendmail.php on testserver
Hi
Thanx for the speedy reply i belive i have errors turned on,
display_errors = On in php.ini
as for header redirect where do i find that its not in php,ini that i can find
Thanx
keith
Thanx for the speedy reply i belive i have errors turned on,
display_errors = On in php.ini
as for header redirect where do i find that its not in php,ini that i can find
Thanx
keith
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Sendmail.php on testserver
No, the header redirect in your code (the second page).
Re: Sendmail.php on testserver
i'm bad didn't even see that in there
sorry m8 and thanx i'm learning
regards
sorry m8 and thanx i'm learning
regards
Re: Sendmail.php on testserver
hi johan
removed the header line so now reads
<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "mrrowell@talktalk.net", "Feedback Form Results",
$message, "From: $email" );
?>
opened my feedback html again a simple file
<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>
put a real email adress in and a mesage test page
hit sumbit but i don't recieve the feedback form inmy inbox
and before i go anyfurther with my form i need to know i got it wher eit comes back to be able to check it does what i want
Thanx for your help so far
regards
keith
removed the header line so now reads
<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "mrrowell@talktalk.net", "Feedback Form Results",
$message, "From: $email" );
?>
opened my feedback html again a simple file
<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>
put a real email adress in and a mesage test page
hit sumbit but i don't recieve the feedback form inmy inbox
and before i go anyfurther with my form i need to know i got it wher eit comes back to be able to check it does what i want
Thanx for your help so far
regards
keith
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Sendmail.php on testserver
Sounds like you're saying it still doesn't work. Check your spam box.monstaink wrote:put a real email adress in and a mesage test page
hit sumbit but i don't recieve the feedback form inmy inbox
Sorry, I have no idea what that means.monstaink wrote:and before i go anyfurther with my form i need to know i got it wher eit comes back to be able to check it does what i want