0810
08-27-2002, 05:57 AM
hi how are you? I just like to know how I can show only text "thank you for filling my form" to next page when I click send's button. Also if you don't fill out mail box, it comes message like "Fill out your E-mail".
Now even though I click send button, it doesn't go next page. Just come up text("thank you for filling my form") under the form in the same page.
I would like to do next page
here is code
<html>
<head>
</head>
<body>
<p>Enter whatever</p>
<form method="post" action="itohideo.php">
Name<input type="text" size="80" name="msg"><br>
E-mail<input type="text" size="80" name="mail">
<br>
Password<input type="text" size="80" name="password"><br>
<input type="submit" name="submit" value="Send">
<input type="reset" name="reset" value="reset">
</form>
<?php
if(isset($_POST["submit"]))
{
$msg=$_POST["msg"];
$mail=$_POST["mail"];
$password=$_POST["password"];
$fp=fopen("log.txt","a");
if(!$fp)
{
print("Can't open your file'");
exit;
}
fwrite($fp,"*******************************************************\r\n\r\n");
fwrite($fp,"Name:\t\t\t$msg\r\n");
fwrite($fp,"E-mail:\t\t$mail\r\n\r\n");
fwrite($fp,"Password:\t\t$password\r\n\r\n");
fclose($fp);
print("Thank you for filling out my form<br>\n");
}
?>
</body>
</html>
Now even though I click send button, it doesn't go next page. Just come up text("thank you for filling my form") under the form in the same page.
I would like to do next page
here is code
<html>
<head>
</head>
<body>
<p>Enter whatever</p>
<form method="post" action="itohideo.php">
Name<input type="text" size="80" name="msg"><br>
E-mail<input type="text" size="80" name="mail">
<br>
Password<input type="text" size="80" name="password"><br>
<input type="submit" name="submit" value="Send">
<input type="reset" name="reset" value="reset">
</form>
<?php
if(isset($_POST["submit"]))
{
$msg=$_POST["msg"];
$mail=$_POST["mail"];
$password=$_POST["password"];
$fp=fopen("log.txt","a");
if(!$fp)
{
print("Can't open your file'");
exit;
}
fwrite($fp,"*******************************************************\r\n\r\n");
fwrite($fp,"Name:\t\t\t$msg\r\n");
fwrite($fp,"E-mail:\t\t$mail\r\n\r\n");
fwrite($fp,"Password:\t\t$password\r\n\r\n");
fclose($fp);
print("Thank you for filling out my form<br>\n");
}
?>
</body>
</html>