PHP pop-up popup and jump to new page to redirect to New page

Source: Internet
Author: User

These two days to write a demo, need to use the hint and jump, the main page requirements are not high, feel no need to use AJAX,JS, and so on, so study how to prompt in PHP and jump.


First used the following:


The code is as follows:

echo "<script> alert (' sucess ');p arent.location.href= '/user/index '; </script> ";


Alert inside is a hint of the message, href is prompted to jump after the page.


Then I thought of a redirect () redirection method in the TP framework and went to see it.


However, the TP comes with not a popup window, so he changed:


The code is 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 can also control the jump time, the content behind the 0 is 0 seconds after the jump.


PHP pop-up popup and jump to new page to redirect to New page

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.