SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Yasirmusthafa pp
yasirmusthafapp@gmail.com
www.facebook.com/yasirmusthafa
twitter.com/yasirmusthafapp
in.linkedin.com/in/yasirmusthafapp
8891396749
GET andPOST,sessionand cookie
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
GET & POST
• 2 methods
• Form data sent from client to server
GET method
GET method
• The data send along the query string
<form action=“registration.php” method=“get”>
• $_GET function is used to collect values in a
form with method=“get".
• Can seen in the url
• Can be bookmarked
• Not suitable for sending password or sensitive
data
• Cant send values exceeding 2000 characters
POST method
POST method
• $_POST function is used to collect values in a
form with method="post".
<form action=“registration” method=“post”>
• Invisible in url
• Cant be bookmarked
• Suitable for sending sensitive data
• 8 mb size by default
GET & POST
GET
• Seen in url
• Can be bookmarked
• Not suitable for sending
sensitive data
• Max size=2000 characters
POST
• Invisible in url
• Cant bookmarked
• Suitable for sending
sensitive data
• Max size=8 mb
Session &Cookie
• Used to maintain the states of http request
Session
• A PHP session variable is used to store
information about, or change settings for a
user session.
• Session variables hold information about one
single user, and are available to all pages in
one application.
Session
Starting php session
Session_start()
Storing a session variable
$_SESSION['intUserId']=$arrUser['pk_int_user_id'];//set session variable
Accessing a session variable
$user_id=$_SESSION['intUserId'];
Destroying a session variable
1. Unset($_SESSION[‘intUserId’])
2. Session_destroy()
Cookie
• A cookie is often used to identify a user.
• A cookie is a small file that the server embeds
on the user's computer.
• Each time the same computer requests a page
with a browser, it will send the cookie too.
Cookie
Create cookie
setcookie("intUserId",$intValue,time()+600);//create cookie variable
Access cookie
$intUserId=$_COOKIE['intUserId'];
Unset cookie
setcookie("intUserId", "", time()-600);//unset cookie
Session &Cookie
Session
• Stored in server
• Lost when browser close
• Store string and object
• Use future reference
cookie
• Stored in browser
• Don’t lose when browser
close
• Only store string
• Cant use
THANK YOU
Want to learn more about programming or Looking to become a good programmer?
Are you wasting time on searching so many contents online?
Do you want to learn things quickly?
Tired of spending huge amount of money to become a Software professional?
Do an online course
@ baabtra.com
We put industry standards to practice. Our structured, activity based courses are so designed
to make a quick, good software professional out of anybody who holds a passion for coding.
Follow us @ twitter.com/baabtra
Like us @ facebook.com/baabtra
Subscribe to us @ youtube.com/baabtra
Become a follower @ slideshare.net/BaabtraMentoringPartner
Connect to us @ in.linkedin.com/in/baabtra
Give a feedback @ massbaab.com/baabtra
Thanks in advance
www.baabtra.com | www.massbaab.com |www.baabte.com
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Cafit Square,
Hilite Business Park,
Near Pantheerankavu,
Kozhikode
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com
Contact Us

Weitere ähnliche Inhalte

Was ist angesagt?

Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSiteGround.com
 
Building fast aspnet websites
Building fast aspnet websitesBuilding fast aspnet websites
Building fast aspnet websitesMaarten Louage
 
[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript Storages[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript StoragesIvan Matiishyn
 
Presentation
PresentationPresentation
PresentationTestled
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website AssetsChris Love
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web developmentAlberto Apellidos
 
JavaServer Pages
JavaServer Pages JavaServer Pages
JavaServer Pages profbnk
 
Campusdiaries Showcase - Raj Chourasia
Campusdiaries Showcase - Raj ChourasiaCampusdiaries Showcase - Raj Chourasia
Campusdiaries Showcase - Raj ChourasiaDrupal Camp Delhi
 
wwwhisper Tool Review
wwwhisper Tool Reviewwwwhisper Tool Review
wwwhisper Tool ReviewMeg Nicol
 
Implementing a Responsive Image Strategy
Implementing a Responsive Image StrategyImplementing a Responsive Image Strategy
Implementing a Responsive Image StrategyChris Love
 
iBELONGmember and iACCOMPLISHpartner 2014
iBELONGmember and iACCOMPLISHpartner 2014iBELONGmember and iACCOMPLISHpartner 2014
iBELONGmember and iACCOMPLISHpartner 2014TonyaDavidson
 
Portfolio Website
Portfolio WebsitePortfolio Website
Portfolio Websiteakhil reddy
 
SEMCON 2013 - WordPress Optimization
SEMCON 2013 - WordPress OptimizationSEMCON 2013 - WordPress Optimization
SEMCON 2013 - WordPress OptimizationMike Lopez
 
21 Ways to Make WordPress Fast
21 Ways to Make WordPress Fast21 Ways to Make WordPress Fast
21 Ways to Make WordPress FastJason McCreary
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorialSon Nguyen
 

Was ist angesagt? (20)

Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla Website
 
Building fast aspnet websites
Building fast aspnet websitesBuilding fast aspnet websites
Building fast aspnet websites
 
[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript Storages[SoftServe IT Academy] - JavaScript Storages
[SoftServe IT Academy] - JavaScript Storages
 
Presentation
PresentationPresentation
Presentation
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website Assets
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
JavaServer Pages
JavaServer Pages JavaServer Pages
JavaServer Pages
 
Campusdiaries Showcase - Raj Chourasia
Campusdiaries Showcase - Raj ChourasiaCampusdiaries Showcase - Raj Chourasia
Campusdiaries Showcase - Raj Chourasia
 
wwwhisper Tool Review
wwwhisper Tool Reviewwwwhisper Tool Review
wwwhisper Tool Review
 
The World of Dynamic Sites
The World of Dynamic SitesThe World of Dynamic Sites
The World of Dynamic Sites
 
SEO For WooCommerce
SEO For WooCommerceSEO For WooCommerce
SEO For WooCommerce
 
Implementing a Responsive Image Strategy
Implementing a Responsive Image StrategyImplementing a Responsive Image Strategy
Implementing a Responsive Image Strategy
 
iBELONGmember and iACCOMPLISHpartner 2014
iBELONGmember and iACCOMPLISHpartner 2014iBELONGmember and iACCOMPLISHpartner 2014
iBELONGmember and iACCOMPLISHpartner 2014
 
Time is the enemy
Time is the enemyTime is the enemy
Time is the enemy
 
Portfolio Website
Portfolio WebsitePortfolio Website
Portfolio Website
 
Hello, Canvas.
Hello, Canvas.Hello, Canvas.
Hello, Canvas.
 
SEMCON 2013 - WordPress Optimization
SEMCON 2013 - WordPress OptimizationSEMCON 2013 - WordPress Optimization
SEMCON 2013 - WordPress Optimization
 
21 Ways to Make WordPress Fast
21 Ways to Make WordPress Fast21 Ways to Make WordPress Fast
21 Ways to Make WordPress Fast
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 
My Portfolio Website
My Portfolio WebsiteMy Portfolio Website
My Portfolio Website
 

Ähnlich wie Get and post,session and cookie

Cookies authentication
Cookies authenticationCookies authentication
Cookies authenticationRsilwal123
 
C# cookieless session id and application state
C# cookieless session id and application stateC# cookieless session id and application state
C# cookieless session id and application stateMalav Patel
 
NZYP Project Casestudy using SilverStripe CMS
NZYP Project Casestudy using SilverStripe CMSNZYP Project Casestudy using SilverStripe CMS
NZYP Project Casestudy using SilverStripe CMSCam Findlay
 
19_JavaScript - Storage_Cookies_students.pptx
19_JavaScript - Storage_Cookies_students.pptx19_JavaScript - Storage_Cookies_students.pptx
19_JavaScript - Storage_Cookies_students.pptxVatsalJain39
 
Advance java session 7
Advance java session 7Advance java session 7
Advance java session 7Smita B Kumar
 
Azure AD B2C Webinar Series: Custom Policies Part 2 Policy Walkthrough
Azure AD B2C Webinar Series: Custom Policies Part 2 Policy WalkthroughAzure AD B2C Webinar Series: Custom Policies Part 2 Policy Walkthrough
Azure AD B2C Webinar Series: Custom Policies Part 2 Policy WalkthroughVinu Gunasekaran
 
Authentication
AuthenticationAuthentication
Authenticationsoon
 
MySQL Security and Standardization at PayPal - Percona Live 2019
MySQL Security and Standardization at PayPal - Percona Live 2019MySQL Security and Standardization at PayPal - Percona Live 2019
MySQL Security and Standardization at PayPal - Percona Live 2019Yashada Jadhav
 
Logging-In with Bitcoin - Paywalls without Emails
Logging-In with Bitcoin - Paywalls without EmailsLogging-In with Bitcoin - Paywalls without Emails
Logging-In with Bitcoin - Paywalls without EmailsMark Smalley
 
Lt local storage
Lt local storageLt local storage
Lt local storageYuzu Saijo
 
12 GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
12   GoMeasure (sg and kl) - page speed light speed path to conversions - joh...12   GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
12 GoMeasure (sg and kl) - page speed light speed path to conversions - joh...Vinoaj Vijeyakumaar
 
Startup Institute NY (Summer 2016) - Authentication, Validation, and Basic Te...
Startup Institute NY (Summer 2016) - Authentication, Validation, and Basic Te...Startup Institute NY (Summer 2016) - Authentication, Validation, and Basic Te...
Startup Institute NY (Summer 2016) - Authentication, Validation, and Basic Te...Matthew Gerrior
 

Ähnlich wie Get and post,session and cookie (20)

Session and cookies,get and post
Session and cookies,get and postSession and cookies,get and post
Session and cookies,get and post
 
Session,cookies and get and post methods
Session,cookies  and get and post methodsSession,cookies  and get and post methods
Session,cookies and get and post methods
 
Session and cookies,get and post methods
Session and cookies,get and post methodsSession and cookies,get and post methods
Session and cookies,get and post methods
 
Cookies authentication
Cookies authenticationCookies authentication
Cookies authentication
 
C# cookieless session id and application state
C# cookieless session id and application stateC# cookieless session id and application state
C# cookieless session id and application state
 
NZYP Project Casestudy using SilverStripe CMS
NZYP Project Casestudy using SilverStripe CMSNZYP Project Casestudy using SilverStripe CMS
NZYP Project Casestudy using SilverStripe CMS
 
Sessions n cookies
Sessions n cookiesSessions n cookies
Sessions n cookies
 
Session and cookies ,get and post methods
Session and cookies ,get and post methodsSession and cookies ,get and post methods
Session and cookies ,get and post methods
 
19_JavaScript - Storage_Cookies_students.pptx
19_JavaScript - Storage_Cookies_students.pptx19_JavaScript - Storage_Cookies_students.pptx
19_JavaScript - Storage_Cookies_students.pptx
 
Advance java session 7
Advance java session 7Advance java session 7
Advance java session 7
 
Azure AD B2C Webinar Series: Custom Policies Part 2 Policy Walkthrough
Azure AD B2C Webinar Series: Custom Policies Part 2 Policy WalkthroughAzure AD B2C Webinar Series: Custom Policies Part 2 Policy Walkthrough
Azure AD B2C Webinar Series: Custom Policies Part 2 Policy Walkthrough
 
Authentication
AuthenticationAuthentication
Authentication
 
MySQL Security and Standardization at PayPal - Percona Live 2019
MySQL Security and Standardization at PayPal - Percona Live 2019MySQL Security and Standardization at PayPal - Percona Live 2019
MySQL Security and Standardization at PayPal - Percona Live 2019
 
Logging-In with Bitcoin - Paywalls without Emails
Logging-In with Bitcoin - Paywalls without EmailsLogging-In with Bitcoin - Paywalls without Emails
Logging-In with Bitcoin - Paywalls without Emails
 
Cookies & Session
Cookies & SessionCookies & Session
Cookies & Session
 
Get method and post method
Get method and post methodGet method and post method
Get method and post method
 
Ecom2
Ecom2Ecom2
Ecom2
 
Lt local storage
Lt local storageLt local storage
Lt local storage
 
12 GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
12   GoMeasure (sg and kl) - page speed light speed path to conversions - joh...12   GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
12 GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
 
Startup Institute NY (Summer 2016) - Authentication, Validation, and Basic Te...
Startup Institute NY (Summer 2016) - Authentication, Validation, and Basic Te...Startup Institute NY (Summer 2016) - Authentication, Validation, and Basic Te...
Startup Institute NY (Summer 2016) - Authentication, Validation, and Basic Te...
 

Mehr von baabtra.com - No. 1 supplier of quality freshers

Mehr von baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Kürzlich hochgeladen

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Get and post,session and cookie

  • 1.
  • 3. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 4. GET & POST • 2 methods • Form data sent from client to server
  • 6. GET method • The data send along the query string <form action=“registration.php” method=“get”> • $_GET function is used to collect values in a form with method=“get". • Can seen in the url • Can be bookmarked • Not suitable for sending password or sensitive data • Cant send values exceeding 2000 characters
  • 8. POST method • $_POST function is used to collect values in a form with method="post". <form action=“registration” method=“post”> • Invisible in url • Cant be bookmarked • Suitable for sending sensitive data • 8 mb size by default
  • 9. GET & POST GET • Seen in url • Can be bookmarked • Not suitable for sending sensitive data • Max size=2000 characters POST • Invisible in url • Cant bookmarked • Suitable for sending sensitive data • Max size=8 mb
  • 10. Session &Cookie • Used to maintain the states of http request
  • 11. Session • A PHP session variable is used to store information about, or change settings for a user session. • Session variables hold information about one single user, and are available to all pages in one application.
  • 12. Session Starting php session Session_start() Storing a session variable $_SESSION['intUserId']=$arrUser['pk_int_user_id'];//set session variable Accessing a session variable $user_id=$_SESSION['intUserId']; Destroying a session variable 1. Unset($_SESSION[‘intUserId’]) 2. Session_destroy()
  • 13. Cookie • A cookie is often used to identify a user. • A cookie is a small file that the server embeds on the user's computer. • Each time the same computer requests a page with a browser, it will send the cookie too.
  • 14. Cookie Create cookie setcookie("intUserId",$intValue,time()+600);//create cookie variable Access cookie $intUserId=$_COOKIE['intUserId']; Unset cookie setcookie("intUserId", "", time()-600);//unset cookie
  • 15. Session &Cookie Session • Stored in server • Lost when browser close • Store string and object • Use future reference cookie • Stored in browser • Don’t lose when browser close • Only store string • Cant use
  • 17. Want to learn more about programming or Looking to become a good programmer? Are you wasting time on searching so many contents online? Do you want to learn things quickly? Tired of spending huge amount of money to become a Software professional? Do an online course @ baabtra.com We put industry standards to practice. Our structured, activity based courses are so designed to make a quick, good software professional out of anybody who holds a passion for coding.
  • 18. Follow us @ twitter.com/baabtra Like us @ facebook.com/baabtra Subscribe to us @ youtube.com/baabtra Become a follower @ slideshare.net/BaabtraMentoringPartner Connect to us @ in.linkedin.com/in/baabtra Give a feedback @ massbaab.com/baabtra Thanks in advance www.baabtra.com | www.massbaab.com |www.baabte.com
  • 19. Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Cafit Square, Hilite Business Park, Near Pantheerankavu, Kozhikode Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com Contact Us