Hi!
I have made a working email form (html page which calls php script to send mail).
What I would like to do is merge both scripts together to have only one file (php). My php code is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<?PHP
$to = "admin@konik.homelinux.net";
$subject = "$POST[subject]";
$headers .= "From: $POST[name] <$POST[email]>";
$message = "$POST[message]";
mail($to, $subject, $message, $headers);
?>
<head>
<title>Thank you / Merci</title>
</head>
<body>
<p><b><font size="5">We will send you username and password to your e-mail
address. </font></b></p>
<p><b><font size="5">Votre identifiant et votre mot de passe seront envoyés a
votre adresse e-mail.</font></b></p>
<a href="https://konik.homelinux.net">Home / Accueil</a></font></p>
</body>
</html>
and my html code is:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title>KONIK</title>
</head>
<body bgcolor=#ffffff vlink=#daa520 link=#d2691e>
<table width=600>
<tr>
<td align="center">
<p align="center"><font color="#0000FF"><b>REQUEST FOR AN ACCOUNT / DEMANDE POUR
UN COMPTE</b></font></td>
</tr>
<tr>
<td align="center">
<p align="center"><b>KONIK POLSKI</b></p>
<form method="POST" action="form.php" enctype="form">
<p align="left"><b>Name / Nom
</b><br>
<input type="text" name="name" size=40>
<p align="left"><b>E-mail </b><br>
<input type="text" name="email" size=40>
<p align="left"><b>Message</b><p align="left">
<textarea rows="10" name="message" cols="70"></textarea><p align="left">
<input type="submit" value="Send / Envoi">
<input type="hidden" name="subject" value="Demande pour un compte KONIK">
</form>
</td>
</tr>
</table>
</body>
</html>
Can anyone suggest me where and what changes I have to make in php script ?