An example for a very simple way to make a mail script that supports HTML tags in PHP.
Lets first create our HTML page to test with this script, i’ve commented out every line so its easier for you to copy and paste it into your text-editor and edit it 😉
<? /* Retrieving user his/her IP Adress */ $ip = getenv("REMOTE_ADDR"); ?> <form action="mail.php"> <b>Nickname:</b><br /> <input type="text" name="nickname" value="Your name/nickname" /><br /><br /> <b>E-mail:</b><br /> <input type="text" name="email" value="Your E-mail" /><br /><br /> <b>Message:</b><br /> <textarea name="message" rows="5" cols="50"></textarea><br /> <input name="Submit" type="submit" value="Submit" /> <input name="Submit" type="reset" value="Reset" /> </form>
So now we’ve got our HTML page, lets start creating the code for mail.php
I hope you enjoyed this tutorial/example 🙂