Jump to content

stop and resume


BigD

Recommended Posts

I have a loop, each time through the loop I create a web page, pause for viewer to print using File > Print. When viewer presses enter I want to resume. How can this be done? A better way would be have a print button, when pressed it will print the web page. How can this be done?

Link to comment
Share on other sites

It doesn't make sense to have PHP respond to user interaction like that on a web site, that's not how PHP works on a web server. If you want to build a desktop application with PHP then you can have it respond to user input, but that model doesn't make sense when a web server is involved. Javascript responds to user input, not PHP. You can use window.print in Javascript to show the print dialog.

  • Like 1
Link to comment
Share on other sites

I wouldn't have done it that way either, but I was unaware of the distinction as I've only used that php/js routine for debugging. I know better now. Thanks jsg.

Link to comment
Share on other sites

What I plan to create is both for web server and desktop. Info are stored for a training school in MySQL DB, Students can check their records through web server. School administrators can do backend records update through desktop application. I thought most web sites operate like that. It has 2 sides. store front is for customers, backend is for store clerks. Am I incorrect?

Link to comment
Share on other sites

When I refer to desktop software, I'm talking about a .exe file (for Windows anyway) that you double-click to run. That's not what PHP running on a web server is like for people accessing it through a browser. I've never created a compiled backend for my clients, they always log in through a browser to manage their site.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...