Greg_elite Posted December 30, 2010 Share Posted December 30, 2010 Can I replace the set message text for $body and $subject with $_POST['message']; $_POST['subject']; so I can get a users input from a html form via php as the action. Instead of the set text in the script. As seen http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm Quote Link to comment Share on other sites More sharing options...
dragon_sa Posted December 30, 2010 Share Posted December 30, 2010 Short answer yes just define it $subject=$_POST['subject']; $body=$_POST['message']; Quote Link to comment Share on other sites More sharing options...
requinix Posted December 30, 2010 Share Posted December 30, 2010 Sure. Beware of people putting malicious stuff in the body - they might try using a While you're at it, try to limit the length of the subject line. A hundred or so characters ought to be enough. Quote Link to comment Share on other sites More sharing options...
Greg_elite Posted December 30, 2010 Author Share Posted December 30, 2010 Short answer yes just define it $subject=$_POST['subject']; $body=$_POST['message']; So can I do exactly that instead of the set text in the script? This would get what the user inputed, just by replacing it to this? BTW Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Greg_elite Posted December 30, 2010 Author Share Posted December 30, 2010 Is that a yes? Help!? Quote Link to comment Share on other sites More sharing options...
dragon_sa Posted December 30, 2010 Share Posted December 30, 2010 Yes, try it Quote Link to comment Share on other sites More sharing options...
Greg_elite Posted December 30, 2010 Author Share Posted December 30, 2010 Yes, try it Thanks Guy's! SOLVED!!! 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.