Jump to content

[SOLVED] PHP (not js)


AV1611

Recommended Posts

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.

 

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.