PHP control front-end dialog box, php front-end dialog box
Application scenarios:
This requirement is derived from user confirmation during authorized logon;
The reason why the corresponding logic is not placed on the frontend is that this part of the logic is partial to functional services, so it is placed on the backend for convenient unified management.
Solution:
Use php echo to generate a javascript script. here we need to pay attention to the buffer zone.
The buffer zone should have three parts: php, webserver, and web browser, which can be output in real time through program code or configuration files. The background is relatively controllable, however, there are different browser buffer mechanisms at the front-end, so I have not studied them in depth. My solution is to allow non-real-time output.
One requirement to allow non-real-time output is that after the pop-up window is processed, no program jump is required. As follows:
<? Php echo "<script> if (confirm ('select the response page, which means yes.html does not apply to HTML? ') Location.href0000'yes.html'; else location.href0000'no.html '; </script> "; // The following hearder Section cannot be added. // Header ('location: http://www.baidu.com ');?>