PHP pop-up prompt box and jump to the new page (redirection)

Source: Internet
Author: User

Start using the following jump:
Echo "<script> alert ('sucess '); parent. location. href ='/user/Index'; </script> ";

Alert contains the prompt message and href is the page to jump to after the prompt.

Later I remembered that there was a redirect () redirection method in the TP framework, so I went and looked at it.

However, TP does not bring a pop-up window, so it is changed:


"<Script> alert ('no loginid'); </script> ";
"<Meta http-equiv = 'refresh' content = '0; URL = '> ";

Two direct jump methods:

("Location:". PSYS_BASE_URL. "user/index" ("refresh :{}; url = {}");

Finally, there is another problem. After the jump code is followed by a return, because the subsequent statements will be executed.

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.