Symantec endpoint protection functions for session in PHP3 (iii)

Source: Internet
Author: User
Example program: TEST_SESSION.PHP3
Require ("cookie.inc.php3");
?>
Session_checkid (20); Session expires in 20 minutes.
Below you need to set the MySQL connection parameters
mysql_connect (' localhost ', ' user ', ' pass ') or Die ("can ' t connect to db!");
?>



<title>session/cookie-Test</title>


This page should show how to handle the "SESSION.INC.PHP3" library


We'll use a mask with a record showing routine


if ($show) {
if (Session_read ()) {
$username = $session [username];
$userpass = $session [Userpass];
echo "

Session[username]: $username
Session[userpass]: $userpass ";
}
}
else{
$session [username]= "Yourid";
$session [userpass]= "12345";
if (!session_write ()) {
Print $sess _error;
}else{
echo "

Session[username] is set to: $session [username]
" ;
echo "Session[userpass" is set to: $session [Userpass]
" ;
echo "Test the function of the session";
}
}
?>


Original Author: unknown

The above describes the function of Symantec endpoint protection to implement the session in PHP3 (iii), including the content of Symantec endpoint Protection, hoping to help friends interested in PHP tutorials.

  • 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.