Nitestarz
asked on
PHP New Window
I have a form on my website. When emailed I would like the email to contain a button that opens a new window to contain printable information from the form.
How can I do this?
How can I do this?
ASKER
Will this window pass the information that was contained in the form that was filled out?
No, this will open a new window to where ever you want. You will probably need to post a form and then open the window to be able to do this in php. You might have better luck doing it in javascript!
etrain01
etrain01
ASKER
Any suggestions for javascript?
Let me look around a bit, it has been awhile for the javascript!!!
etrain01
etrain01
I just reread your question... You want this button in the email??? This will most likely not work unless the users have html enabled email. If you just want to give them the option to print the page then that is easily done in php or javascript or they can just print the email they get.
Maybe I am not quite getting what you are trying to do, any more info???
etrain01
Maybe I am not quite getting what you are trying to do, any more info???
etrain01
You will not really have any way of putting Javascript in email.
If you want it to open up a new window to have form information formatted to print, you should save a webpage onto your own server, then send them this link:
http://www.yourdomain.com/yourfolder/print_details.php?aid=19038
where aid can be their special id for their details page. You can also tell them it will only be available for, let's say a week, and after that, you can delete them with a cron job, for instance.
To have it open in a new window, if possible, try to use an <a> tag with target="_blank" sine Javascript probably won't work.
If you want it to open up a new window to have form information formatted to print, you should save a webpage onto your own server, then send them this link:
http://www.yourdomain.com/yourfolder/print_details.php?aid=19038
where aid can be their special id for their details page. You can also tell them it will only be available for, let's say a week, and after that, you can delete them with a cron job, for instance.
To have it open in a new window, if possible, try to use an <a> tag with target="_blank" sine Javascript probably won't work.
ASKER
The email is getting sent to our company, which the user sends their information too. The printable button is just because our people our complaining that they want a printable different version for their records.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What you could do is send them another email with the printable information, or when you send the email change the way it is being sent so that your company likes it...
etrain01
etrain01
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: Zyloch
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
- Neester -
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: Zyloch
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
- Neester -
EE Cleanup Volunteer
add this to you email body!
<input type="button" value="open site" onclick="window.open('http:://yoursite.com')">