mindapolis Posted December 4, 2013 Share Posted December 4, 2013 Hi I'm trying to get the mail function working. I tested it with my own email but I haven't gotten an email. could I please get some help? <?php $fname = $_POST['fname']; $email = $_POST['email']; $subject = "hi"; mail($fname, $email, $subject); ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Untitled Document</title> <style type="text/css"> header { background-color: #735435; } </style> </head> <body> <form action="" method="post" name="contact"> name <input name="fname" type="text" size="7"> Email <input name="email" type="text" size="20"> <input name="SUBMIT " type="submit" value="SUBMIT"> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
Solution digibucc Posted December 4, 2013 Solution Share Posted December 4, 2013 (edited) your order is wrong, the to email comes first. <?php mail($email, $subject, $fname); Edited December 4, 2013 by digibucc Quote Link to comment Share on other sites More sharing options...
mindapolis Posted December 4, 2013 Author Share Posted December 4, 2013 Thank you so much. It 's working. 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.