I have buit an HTML email which contains a form that runs a PHP script as follows:
<form method="post" action="http://.../form.php">
As the email is local to the user, I have put the full URL to php script.
It works fine, except that whenever I submit a web page pops up with the above 'action' url displayed.
I dont want this browser window to appear. Can I stop it from happening?
Cheers
Craig.
--Form.php:
<?php
/ recipients /
$to = "Craig <craig@...>"
/ subject /
$subject = "a subject";
/ message /
$message = '
<head>
<title>Response</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0099CC" vlink="#0099CC" alink="#0099CC">
This is text of the message
</body>
';
/ To send HTML mail, you can set the Content-type header. /
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/ additional headers /
$headers .= "From: me@emailaddress.com\r\n";
/ and now mail it /
mail($to, $subject, $message, $headers);
?>