This article for you to introduce the use of PHP pop-up balloon and jump to the new page, which is what we think of the redirect, the following example you can refer to the
This two days to write a demo, need to use the prompt and jump, the main page requirements are not high, feel that there is no need to use AJAX,JS, and so on, so I studied how in the PHP prompts and jump. Starting with the following: The code reads: Echo <script> alert (' sucess ');p arent.location.href= '/user/index '; </script> "; Alert is the message, and HREF is the page that jumps after prompting. Then I thought of a redirect () redirection method in the TP framework, and went to see it. But TP is not with the pop-up window, so they changed: code as follows: Echo <script> alert (' No loginID '); </script> "; echo "<meta http-equiv= ' Refresh ' content= ' 0; Url= $url ' > '; $url is the page to jump, at the same time, this also can control the jump time, the content of the following 0 means 0 seconds after the jump. Here, MO away again gives two direct jump way: The code is as follows: Header ("Location:"). Psys_base_url. " User/index "); and code as follows: Header ("refresh:{$time};url={$url}"); These two ways without prompting, direct jump. Recommend one of the following. Finally, there is a problem, the jump code followed by a return, because it will also execute the following statement