SlideShare a Scribd company logo
7. Add session support so users can only see the loginHistory.php page if they have filled out the
login form with valid data and have not clicked the logout link. You do not need to add any PHP
validation to complete this step. Specifically: 1. In login.php: add PHP code so that if we arrived by
POST, we start a session and store the username in it, then redirect to loginHistory.php 2. In
loginHistory.php: add PHP code that starts a session and redirects back to login.php if
$_SESSION["username"] has length of 0 3. Create a logout.php page with PHP code that starts a
session, unsets and destroys it, then redirects back to login.php

More Related Content

More from Acro1988

7 A recent study by Mkare et al 2017 on population stru.pdf
7 A recent study by Mkare et al 2017 on population stru.pdf7 A recent study by Mkare et al 2017 on population stru.pdf
7 A recent study by Mkare et al 2017 on population stru.pdf
Acro1988
 
6b Besides Crater Lake give another example on Earth of thi.pdf
6b Besides Crater Lake give another example on Earth of thi.pdf6b Besides Crater Lake give another example on Earth of thi.pdf
6b Besides Crater Lake give another example on Earth of thi.pdf
Acro1988
 
6 Write a Python functoion that takes in a dictionary and p.pdf
6 Write a Python functoion that takes in a dictionary and p.pdf6 Write a Python functoion that takes in a dictionary and p.pdf
6 Write a Python functoion that takes in a dictionary and p.pdf
Acro1988
 
6710 Let X1X2Xn be a random sample from a distribution.pdf
6710 Let X1X2Xn be a random sample from a distribution.pdf6710 Let X1X2Xn be a random sample from a distribution.pdf
6710 Let X1X2Xn be a random sample from a distribution.pdf
Acro1988
 
60 A difference between a ListBox and a dropdown style Com.pdf
60 A difference between a ListBox and a dropdown style Com.pdf60 A difference between a ListBox and a dropdown style Com.pdf
60 A difference between a ListBox and a dropdown style Com.pdf
Acro1988
 
62 of 71 delegates in a political convention favored changi.pdf
62 of 71 delegates in a political convention favored changi.pdf62 of 71 delegates in a political convention favored changi.pdf
62 of 71 delegates in a political convention favored changi.pdf
Acro1988
 
64 of owned dogs in the United States are spayed or neutere.pdf
64 of owned dogs in the United States are spayed or neutere.pdf64 of owned dogs in the United States are spayed or neutere.pdf
64 of owned dogs in the United States are spayed or neutere.pdf
Acro1988
 
6 Farly scientists tried to determine the age of Zarth usin.pdf
6 Farly scientists tried to determine the age of Zarth usin.pdf6 Farly scientists tried to determine the age of Zarth usin.pdf
6 Farly scientists tried to determine the age of Zarth usin.pdf
Acro1988
 
6 Using your own words explain the pathophysiology of DIC .pdf
6 Using your own words explain the pathophysiology of DIC .pdf6 Using your own words explain the pathophysiology of DIC .pdf
6 Using your own words explain the pathophysiology of DIC .pdf
Acro1988
 
62 A 10yearold boy is admitted with pallor His CBC shows.pdf
62 A 10yearold boy is admitted with pallor His CBC shows.pdf62 A 10yearold boy is admitted with pallor His CBC shows.pdf
62 A 10yearold boy is admitted with pallor His CBC shows.pdf
Acro1988
 
63 Consider the loop in the program of Figure 28 Assume i.pdf
63 Consider the loop in the program of Figure 28 Assume i.pdf63 Consider the loop in the program of Figure 28 Assume i.pdf
63 Consider the loop in the program of Figure 28 Assume i.pdf
Acro1988
 
6 Write a shell script lsmorebash that displays the file.pdf
6 Write a shell script lsmorebash that displays the file.pdf6 Write a shell script lsmorebash that displays the file.pdf
6 Write a shell script lsmorebash that displays the file.pdf
Acro1988
 
6 X1X2X35 are normal random variables with mean and va.pdf
6 X1X2X35 are normal random variables with mean  and va.pdf6 X1X2X35 are normal random variables with mean  and va.pdf
6 X1X2X35 are normal random variables with mean and va.pdf
Acro1988
 
6 Name and describe three ways in which cells can drive act.pdf
6 Name and describe three ways in which cells can drive act.pdf6 Name and describe three ways in which cells can drive act.pdf
6 Name and describe three ways in which cells can drive act.pdf
Acro1988
 
6 Who developed Data Encryption Standard DES Your answ.pdf
6 Who developed Data Encryption Standard  DES Your answ.pdf6 Who developed Data Encryption Standard  DES Your answ.pdf
6 Who developed Data Encryption Standard DES Your answ.pdf
Acro1988
 
6 Describe the features of the function in the graph and cr.pdf
6 Describe the features of the function in the graph and cr.pdf6 Describe the features of the function in the graph and cr.pdf
6 Describe the features of the function in the graph and cr.pdf
Acro1988
 
6 Psychologists believe that teenagers use of Facebook incr.pdf
6 Psychologists believe that teenagers use of Facebook incr.pdf6 Psychologists believe that teenagers use of Facebook incr.pdf
6 Psychologists believe that teenagers use of Facebook incr.pdf
Acro1988
 
6 KDEL dizisinin sinyal dizisinin ve nkleer lokalizasyon .pdf
6 KDEL dizisinin sinyal dizisinin ve nkleer lokalizasyon .pdf6 KDEL dizisinin sinyal dizisinin ve nkleer lokalizasyon .pdf
6 KDEL dizisinin sinyal dizisinin ve nkleer lokalizasyon .pdf
Acro1988
 
6 Give the probability of two individuals heterozygous for .pdf
6 Give the probability of two individuals heterozygous for .pdf6 Give the probability of two individuals heterozygous for .pdf
6 Give the probability of two individuals heterozygous for .pdf
Acro1988
 
6 Opportunity cost and production possibilities Edison is a.pdf
6 Opportunity cost and production possibilities Edison is a.pdf6 Opportunity cost and production possibilities Edison is a.pdf
6 Opportunity cost and production possibilities Edison is a.pdf
Acro1988
 

More from Acro1988 (20)

7 A recent study by Mkare et al 2017 on population stru.pdf
7 A recent study by Mkare et al 2017 on population stru.pdf7 A recent study by Mkare et al 2017 on population stru.pdf
7 A recent study by Mkare et al 2017 on population stru.pdf
 
6b Besides Crater Lake give another example on Earth of thi.pdf
6b Besides Crater Lake give another example on Earth of thi.pdf6b Besides Crater Lake give another example on Earth of thi.pdf
6b Besides Crater Lake give another example on Earth of thi.pdf
 
6 Write a Python functoion that takes in a dictionary and p.pdf
6 Write a Python functoion that takes in a dictionary and p.pdf6 Write a Python functoion that takes in a dictionary and p.pdf
6 Write a Python functoion that takes in a dictionary and p.pdf
 
6710 Let X1X2Xn be a random sample from a distribution.pdf
6710 Let X1X2Xn be a random sample from a distribution.pdf6710 Let X1X2Xn be a random sample from a distribution.pdf
6710 Let X1X2Xn be a random sample from a distribution.pdf
 
60 A difference between a ListBox and a dropdown style Com.pdf
60 A difference between a ListBox and a dropdown style Com.pdf60 A difference between a ListBox and a dropdown style Com.pdf
60 A difference between a ListBox and a dropdown style Com.pdf
 
62 of 71 delegates in a political convention favored changi.pdf
62 of 71 delegates in a political convention favored changi.pdf62 of 71 delegates in a political convention favored changi.pdf
62 of 71 delegates in a political convention favored changi.pdf
 
64 of owned dogs in the United States are spayed or neutere.pdf
64 of owned dogs in the United States are spayed or neutere.pdf64 of owned dogs in the United States are spayed or neutere.pdf
64 of owned dogs in the United States are spayed or neutere.pdf
 
6 Farly scientists tried to determine the age of Zarth usin.pdf
6 Farly scientists tried to determine the age of Zarth usin.pdf6 Farly scientists tried to determine the age of Zarth usin.pdf
6 Farly scientists tried to determine the age of Zarth usin.pdf
 
6 Using your own words explain the pathophysiology of DIC .pdf
6 Using your own words explain the pathophysiology of DIC .pdf6 Using your own words explain the pathophysiology of DIC .pdf
6 Using your own words explain the pathophysiology of DIC .pdf
 
62 A 10yearold boy is admitted with pallor His CBC shows.pdf
62 A 10yearold boy is admitted with pallor His CBC shows.pdf62 A 10yearold boy is admitted with pallor His CBC shows.pdf
62 A 10yearold boy is admitted with pallor His CBC shows.pdf
 
63 Consider the loop in the program of Figure 28 Assume i.pdf
63 Consider the loop in the program of Figure 28 Assume i.pdf63 Consider the loop in the program of Figure 28 Assume i.pdf
63 Consider the loop in the program of Figure 28 Assume i.pdf
 
6 Write a shell script lsmorebash that displays the file.pdf
6 Write a shell script lsmorebash that displays the file.pdf6 Write a shell script lsmorebash that displays the file.pdf
6 Write a shell script lsmorebash that displays the file.pdf
 
6 X1X2X35 are normal random variables with mean and va.pdf
6 X1X2X35 are normal random variables with mean  and va.pdf6 X1X2X35 are normal random variables with mean  and va.pdf
6 X1X2X35 are normal random variables with mean and va.pdf
 
6 Name and describe three ways in which cells can drive act.pdf
6 Name and describe three ways in which cells can drive act.pdf6 Name and describe three ways in which cells can drive act.pdf
6 Name and describe three ways in which cells can drive act.pdf
 
6 Who developed Data Encryption Standard DES Your answ.pdf
6 Who developed Data Encryption Standard  DES Your answ.pdf6 Who developed Data Encryption Standard  DES Your answ.pdf
6 Who developed Data Encryption Standard DES Your answ.pdf
 
6 Describe the features of the function in the graph and cr.pdf
6 Describe the features of the function in the graph and cr.pdf6 Describe the features of the function in the graph and cr.pdf
6 Describe the features of the function in the graph and cr.pdf
 
6 Psychologists believe that teenagers use of Facebook incr.pdf
6 Psychologists believe that teenagers use of Facebook incr.pdf6 Psychologists believe that teenagers use of Facebook incr.pdf
6 Psychologists believe that teenagers use of Facebook incr.pdf
 
6 KDEL dizisinin sinyal dizisinin ve nkleer lokalizasyon .pdf
6 KDEL dizisinin sinyal dizisinin ve nkleer lokalizasyon .pdf6 KDEL dizisinin sinyal dizisinin ve nkleer lokalizasyon .pdf
6 KDEL dizisinin sinyal dizisinin ve nkleer lokalizasyon .pdf
 
6 Give the probability of two individuals heterozygous for .pdf
6 Give the probability of two individuals heterozygous for .pdf6 Give the probability of two individuals heterozygous for .pdf
6 Give the probability of two individuals heterozygous for .pdf
 
6 Opportunity cost and production possibilities Edison is a.pdf
6 Opportunity cost and production possibilities Edison is a.pdf6 Opportunity cost and production possibilities Edison is a.pdf
6 Opportunity cost and production possibilities Edison is a.pdf
 

Recently uploaded

skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 

Recently uploaded (20)

skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 

7 Add session support so users can only see the loginHistor.pdf

  • 1. 7. Add session support so users can only see the loginHistory.php page if they have filled out the login form with valid data and have not clicked the logout link. You do not need to add any PHP validation to complete this step. Specifically: 1. In login.php: add PHP code so that if we arrived by POST, we start a session and store the username in it, then redirect to loginHistory.php 2. In loginHistory.php: add PHP code that starts a session and redirects back to login.php if $_SESSION["username"] has length of 0 3. Create a logout.php page with PHP code that starts a session, unsets and destroys it, then redirects back to login.php