How to jump to the page after successful login in php

Guanhui
Release: 2023-03-01 06:44:01
Original
11129 people have browsed it

How to jump to the page after successful login in php

How to implement successful login page jump in php

First, it will be judged whether the user has successfully logged in. If the login is successful, use "header( )" function, set the "Location" of the http request header to the URL address that needs to be jumped, and then use the function "exit()" to end the script.

header() function

header() is used to send native HTTP headers.

header ( string $string [, bool $replace = true [, int $http_response_code ]] ) : void
Copy after login

Usage examples

<?php
header(&#39;Location: http://www.example.com/&#39;);
exit;
?>
Copy after login

Recommended tutorial: "PHP Tutorial"

The above is the detailed content of How to jump to the page after successful login in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template