Jump to content

Need to print a web page, then redirect?


Solarpitch

Recommended Posts

Hey,

 

I have a script on my sites that will allow user's to add products on the site to a "favorites" list which is just a array session. When the user goes to the myfavorites.php page there is an option to print that will take them to html page where I have formatted the print with a nice header, footer and there products displayed in the middle.

 

I dont want to make this page visible to the user. I want for them to click on the print button in myfavorites.php then it will divert to print.php, ececute something to print that page then direct back to my myfavorites.php.

 

The directing is not a problem as I can use headers and that but I just dont know if I can execute something automatically on print.php that will print the contents of the page?

 

 

Link to comment
https://forums.phpfreaks.com/topic/116990-need-to-print-a-web-page-then-redirect/
Share on other sites

Hi waynewex,

 

I'm not sure how that would work in relation to printing the contents of the page. I need to run a query on the page first that will get all the user's products form the array, then run some sort of print page script... then divert back to where the user was.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.