marshmellows_17 Posted September 19, 2008 Share Posted September 19, 2008 I have the following code: <?php include "header.php"; ?> <?php if (isset($_REQUEST['email'])) //if "email" is filled out, send email { //send email $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['Yourname'] ; $message .= $_REQUEST['phonenumber']; $message .= $_REQUEST['emailaddress']; mail( "[email protected]", "Subject: $subject", $message , "From: $email" ); echo "Thank you for using our mail form"; } else //if "email" is not filled out, display the form { echo "<form method='post' action='bookapp.php'> Email: <input name='email' type='text' /> Subject: <input name='subject' type='text' /> Name: <textarea name='Yourname' rows='15' cols='40'> </textarea> Phone Number: <textarea name='phonenumber' rows='15' cols='40'> </textarea> E-mail Address: <textarea name='emailaddress' rows='15' cols='40'> </textarea> <input type='submit' /> </form>"; } ?> <?php include "footer.php"; ?> My problem is that to start with the code is unsafe. When I receive an email after the above form is filled out hotmail thinks the message is dangerous, and I cant remember what php code and where is needed to make the emails appear safe. Also when the emails arrive and i open them (after overriding the warnings) all the answers appear on a single line how do i get it to make each answer appear on a new line ive tried "\n" in various places but cant figure it out. Thank you Link to comment https://forums.phpfreaks.com/topic/124937-mail-form-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.