Session and Cookie

  • 504 views
Uploaded on

ตรวจสอบข้อมูลด้วย Session และ Cookie

ตรวจสอบข้อมูลด้วย Session และ Cookie

More in: Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
504
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
26
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Mr.Warawut KhangkhanFacebook:Facebook: http://www.facebook.com/AjWarawut Twitter: http://twitter.com/awarawut E-Mail: awarawut@hotmail.com Mobile: 089-461-9591 089-461-
  • 2. Mr.Warawut Khangkhan Chapter 16 Session & Cookie 2
  • 3. Session PHP F version 4.0 F F F F Session F F PHP FMr.Warawut Khangkhan Chapter 16 Session & Cookie 3
  • 4. F session session_start( ) F F F F (initialize) session : session_start( ) session_register( ) F F F session ( F>1 ) : session_register( [, …]) : F F session_register( ) F F $ F F session F single quote double quoteMr.Warawut Khangkhan Chapter 16 Session & Cookie 4
  • 5. New document: PHPSave: session_register1.phpMr.Warawut Khangkhan Chapter 16 Session & Cookie 5
  • 6. New document: PHPSave: session_register2.phpMr.Warawut Khangkhan Chapter 16 Session & Cookie 6
  • 7. F session session_unregister( ) F F session : session_unregister( ) session_destroy( ) F F F session : session_destroy( )Mr.Warawut Khangkhan Chapter 16 Session & Cookie 7
  • 8. F F Session F session_file1.php F F F F F F username F F session_file2.php F $username F session F F $username (Global Variable) PHP F F PHP F F F username F session_file1.php F ( F F PHP <form> HTML F session) F session_file3.php F $username F $username F F F FMr.Warawut Khangkhan Chapter 16 Session & Cookie 8
  • 9. New document: PHPSave: session_file1.phpMr.Warawut Khangkhan Chapter 16 Session & Cookie 9
  • 10. New document: PHPSave: session_file2.phpMr.Warawut Khangkhan Chapter 16 Session & Cookie 10
  • 11. New document: PHPSave: session_file3.phpMr.Warawut Khangkhan Chapter 16 Session & Cookie 11
  • 12. Mr.Warawut Khangkhan Chapter 16 Session & Cookie 12
  • 13. Cookie F F F F F F F F F F cookie F F F F cookie F (expire) F F F PHP F PHP F cookie F F cookie F F PHP PHP F F F FMr.Warawut Khangkhan Chapter 16 Session & Cookie 13
  • 14. F F F Session & Cookie Cookie Session F F F F F F F F F F session F F F F F F F F F F F F F FMr.Warawut Khangkhan Chapter 16 Session & Cookie 14
  • 15. F F Cookie cookie web server web browser F F F header HTTP Protocol F F F setcookie( ) F PHP FF F browser F : F F F output buffering F F F F F F (buffer) F F F F F F browser FMr.Warawut Khangkhan Chapter 16 Session & Cookie 15
  • 16. New document: PHPSave: cookie_create.phpMr.Warawut Khangkhan Chapter 16 Session & Cookie 16
  • 17. New document: PHPSave: cookie_test.phpMr.Warawut Khangkhan Chapter 16 Session & Cookie 17
  • 18. F Output Buffering ob_start( ) F F output buffering F F F F F ob_end_flush( ) F FF F F F F output buffering F F FMr.Warawut Khangkhan Chapter 16 Session & Cookie 18