<HTML>
<HEAD><TITLE>E-mail</TITLE>
<FORM METHOD=POST ACTION="sendmail.php">
<TABLE>
<TR>
<TD>E-mail:</TD>
<TD> <INPUT TYPE="text" NAME="email" size="25" /></TD>
</TR>
<TR>
<TD valign=top>Message:</TD>
<TD> <TEXTAREA NAME="message" ROWS="15" COLS="40"></TEXTAREA> <p></TD>
</TR>
<TR>
<TD colspan="2" align=center><INPUT name="submit" TYPE="submit" value="Submit"></TD>
</TR>
</TABLE>
</FORM>
</HEAD>
</HTML>
----------------
sendmail.php:
<?php
$email = $_REQUEST['email'];
$message = $_REQUEST['message'];
mail("myemail@yahoo.com","FeedBackt", $message, "From: $email");
header("Location: thankyou.html");
?>
I got a "Save As" dialog when I hit the button Submit. That's weird! could anybody tell me why thankyou.html has not come up?
(I put both of them in the folder C:\AppSer\apache\htdocs)
How to test sendmail on local machine?
Moderator: General Moderators
Do you have php installed ?
make a page with this code .
save it as test.php and run it..
http://localhost/test.php
make a page with this code .
Code: Select all
<?
phpinfo();
?>http://localhost/test.php
You can not test sendmail functionality on localhost and you need a real host .
but if you want send mail from localhost , it is possible.
for more info take a look at this :
viewtopic.php?t=12462&highlight=
but if you want send mail from localhost , it is possible.
for more info take a look at this :
viewtopic.php?t=12462&highlight=
How to test sendmail on local machine?
Thanks very much,