dgow13 Posted January 15, 2010 Report Share Posted January 15, 2010 I have 2 questions. I am new to php programming. I watched the beginner tutorials for php, followed the samples, designed a contact form & thank you page and then sent everything to my email. Everything went just fine. In my email all the information showed up except the radio button and drop down list info. I have no idea how to get that information to send. Any suggestions? Also, How can I structure the contact form, once it shows up in my email, to be organized as follows: Name: Name text Email: Email text Phone: Phone text Comments: Text... and so on? I appreciate your help. Quote Link to comment Share on other sites More sharing options...
Wickham Posted January 15, 2010 Report Share Posted January 15, 2010 (edited) Your PHP mail code needs something like:- mail( $admin, "Form Feedback: $subject", "$name\n\r$email\n\r$phone\n\r$comments", "From: $name " ); where the \n makes the text start a new line and \r means carriage return (a hangover from type writers and as far as I know do the same thing, using only \n seems to work) and $name is the variable relating to the form field name="name" $name = remove_headers($_POST['name']) ; Edited January 15, 2010 by Wickham Quote Link to comment Share on other sites More sharing options...
dgow13 Posted January 15, 2010 Author Report Share Posted January 15, 2010 (edited) Thank you. It worked. I just have to figure out how to line it up now so it looks professional and more uniformed. Edited January 17, 2010 by dgow13 Quote Link to comment Share on other sites More sharing options...
administrator Posted January 19, 2010 Report Share Posted January 19, 2010 Thank you. It worked. I just have to figure out how to line it up now so it looks professional and more uniformed. Hi, You should check out this thread on formatting emails sent with PHP. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.