Agenda main content
Agenda for Day 32 of CS 350
- Announcements
- Quiz 4 on Friday
- Short Answer Questions - Comprehensive
- 10 questions, 2 points each (20 points total)
- Closed book, closed Web
- Programming Problem using PHP and SQLite
- One problem (30 points total)
- Open book, open Web
- Done on Computer, graded online
- Short Answer Questions - Comprehensive
- Lab Assignments
- Lab 14 due today
- No more lab assignments this quarter
- Project 1 Milestones
- Memorandum 6 containing a site diagram of website content and organization (neatly hand-drawn is OK) due today (one per team)
- Group Oral Presentations due next Monday and Tuesday
- Monday
- Group m:
- Group n:
- Tuesday
- Group o:
- Group p:
- Monday
- Website due next Tuesday
- Be sure your website is saved in your group cs350's account under folder
U:\Project1
- Be sure your website is saved in your group cs350's account under folder
- Individual Memorandums assessing individual and team effectiveness due next Tuesday (by each team member)
- Reflect on what is working well, areas for improvement, and serious deficiencies in team member's efforts and contributions
- Readings
- For today: Session Handling Functions
- Today's topics and learning objectives
After today's class, you should be able to- Explain what is meant by the statement: HTTP is a stateless protocol
- Use phpInfo(); to display information about the current state of PHP
- Use PHP Session Variables
- session_save_path ("./sessiondata/");
- session_start();
- Create session variable example code
- Check session variable example code
- Remove session variable example code
- $_SESSION = array(); // remove all session variables
- session_destroy();
- Use Cookies for long term storage
- Set the cookie
bool setcookie(name, value, [expiry], [path], [domain], [secure]);- name - The name of the cookie
- value - The value to be held in the cookie
- expiry - The expiry time of the cookie (optional)
e.g.
7 days from now: time() + (60 * 60 * 24 * 7)
only as long as the session: 0
delete the cookie: time() - 3600
- Get the cookie
$value = $_COOKIE['cookieName'] - Hands-on example - Day 33
- Set the cookie