KieranT
11-26-2008, 07:02 PM
PHP Mail Help
Hi,
I'm learning PHP in spare time, and I'm currently attempting a mail script, as far as I can see everything is how it should be? anyway here is my code:
Code:
<html>
<body>
<form action="mailform.php" method="post">
Email To: <input type="text" name="email" />
Subject: <input type="text" name="subject" />
Message: <input type="text" name="message" />
<input type="submit" />
</body>
</html>
The above code is in email.php
Code:
<html>
<body>
<?php
$email = <?php echo $_POST["email"];
$subject = <?php echo $_POST["subject"];
$message = <?php echo $_POST["message"];
// Use wordwrap() if lines are longer than 70 characters
$email = wordwrap($email,70);
// Send email
mail($email,$subject,$message);
?>
</body>
</html>
The second is mailform.php
If you wish to check this code in action its located:
D3Clans.Com/Kieran/PHP/email.php
Any help me appreciated
Kier
Hi,
I'm learning PHP in spare time, and I'm currently attempting a mail script, as far as I can see everything is how it should be? anyway here is my code:
Code:
<html>
<body>
<form action="mailform.php" method="post">
Email To: <input type="text" name="email" />
Subject: <input type="text" name="subject" />
Message: <input type="text" name="message" />
<input type="submit" />
</body>
</html>
The above code is in email.php
Code:
<html>
<body>
<?php
$email = <?php echo $_POST["email"];
$subject = <?php echo $_POST["subject"];
$message = <?php echo $_POST["message"];
// Use wordwrap() if lines are longer than 70 characters
$email = wordwrap($email,70);
// Send email
mail($email,$subject,$message);
?>
</body>
</html>
The second is mailform.php
If you wish to check this code in action its located:
D3Clans.Com/Kieran/PHP/email.php
Any help me appreciated
Kier
