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> Link to comment https://forums.phpfreaks.com/topic/284532-mail-function-not-working/ Share on other sites More sharing options...
digibucc Posted December 4, 2013 Share Posted December 4, 2013 your order is wrong, the to email comes first. <?php mail($email, $subject, $fname); Link to comment https://forums.phpfreaks.com/topic/284532-mail-function-not-working/#findComment-1461286 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. Link to comment https://forums.phpfreaks.com/topic/284532-mail-function-not-working/#findComment-1461295 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.