In the program development, often the page into a static form of HTML, which can alleviate the server load, but there is also a problem is when the registered user login, in the HTML page to display the login success or need to login prompt, so we have to think of other ways to achieve, the following we are using js+ PHP, and, of course, Ajax can be implemented.
Static page real-time call user login and Exit login program (web effects call PHP Tutorial code)
Static page real-time call user login and Exit login program (Web effect call PHP code)
loginajax.php File Code
$id = isset ($_get[' fid ")? $_get[' FID ']:0;
if (!isset ($_cookie[' VVG ')) {
?>
document.write (' User name:');
document.write ('');
}
Else
{
Echo ' document.write (' ['. $_cookie[' realname '], ' speak out ');
}
?>
This article original in http://www.bkjia.com/phper/php.html reprint annotated source, thank you for your cooperation.
http://www.bkjia.com/PHPjc/444881.html www.bkjia.com true http://www.bkjia.com/PHPjc/444881.html techarticle in the development of the program, the page is often made into the static form of HTML, which can alleviate the server load, but there is also a problem is when the registered user login, the HTML page to display ...