AV1611 Posted February 7, 2008 Share Posted February 7, 2008 Not sure if I can do this with javascript. I like to work with PHP only... Here's what I need to do: I have an online form. When you click submit, I want it to do two things: 1. Open a "printable" page that they can sign and mail in via snail mail (or fax) 2. Send an email with the form information. I can do each on separately as php scripts, but can they both happen with a single submit button click? (does the email headers count as output preventing the header from going to the new page or whatever?) I think I want it to capture the data, send the email, then build the form as a printable webpage or as a .doc or .txt file with download headers. I just need concept help, not actual code help. Thanks. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 7, 2008 Share Posted February 7, 2008 Of course you can. Just have your code for sending the email, then your code to display the printable version right after. The 'headers' for an email are separate from those of the page. Just be careful, cus if they keep hitting refresh, it will keep sending you an email. You may want to set a session variable to track the fact that the email was sent already. Then just clear the session variable if they return to the form (so they can submit it again). Quote Link to comment Share on other sites More sharing options...
AV1611 Posted February 7, 2008 Author Share Posted February 7, 2008 Thanks for the quick replay. So it's only headers sent to a browser window that matter? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 7, 2008 Share Posted February 7, 2008 Um...*yes*....what headers are you sending to the browser? 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.