PHP pop-up prompt box and jump to the new page is redirected to the new page

Source: Internet
Author: User

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
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.