Webpage and database design for Chia-Yao Chien.

Slides:



Advertisements
Similar presentations
LIS651 lecture 3 taming PHP Thomas Krichel
Advertisements

LIS651 lecture 3 functions & sessions Thomas Krichel
UFCE8V-20-3 Information Systems Development 3 (SHAPE HK)
Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
Website Development Registering Users – Introducing Cookies.
Design Aspects. User Type the URL address on the cell phone or web browser Not required to login.
Chapter 10 Managing State Information PHP Programming with MySQL.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Chapter 10 Maintaining State Information Using Cookies.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Cookies & Sessions.
Cookies Set a cookie – setcookie() Extract data from a cookie - $_COOKIE Augment user authentication script with a cookie.
Chapter 12 Cookies and Sessions Part 2. Setting Cookie Parameters setcookie(name, value, expiration, path, host, secure, httponly) epoch – midnight on.
CHAPTER 12 COOKIES AND SESSIONS. INTRO HTTP is a stateless technology Each page rendered by a browser is unrelated to other pages – even if they are from.
CSC 2720 Building Web Applications Cookies, URL-Rewriting, Hidden Fields and Session Management.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
JavaScript, Fourth Edition
Working with Cookies Managing Data in a Web Site Using JavaScript Cookies* *Check and comply with the current legislation regarding handling cookies.
CSE 154 LECTURE 12: COOKIES. Including files: include include("filename"); PHP include("header.html"); include("shared-code.php"); PHP inserts the entire.
Web Programming Language Week 7 Dr. Ken Cosh Security, Sessions & Cookies.
Creating Databases for Web Applications cookie examples lab time: favorites cookies & Sessions class time for group work/questions on projects Next class:
Chapter 8 Cookies And Security JavaScript, Third Edition.
School of Computing and Information Systems CS 371 Web Application Programming PHP – Forms, Cookies, Sessions and Database.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
1 Chapter 9 – Cookies, Sessions, FTP, and More spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science.
PHP2. PHP Form Handling The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input. Name: Age:
Cookies & Session Web Technology
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Dynamic Programming with PHP (mktime), Cookies, SQL, Authentication.
PHP Programming with MySQL Slide 10-1 CHAPTER 10 Managing State Information.
COOKIES and SESSIONS. COOKIES 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.
Web Database Programming Week 7 Session Management & Authentication.
Cookies and Sessions IDIA 618 Fall 2014 Bridget M. Blodgett.
Sessions and Cookies State Management, Cookies, Sessions, Hidden Fields SoftUni Team Technical Trainers Software University
PHP Cookies. Cookies are small files that are stored in the visitor's browser. Cookies can be used to identify return visitors, keep a user logged into.
DataFlow Diagram – Level 0
ECMM6018 Enterprise Networking for Electronic Commerce Tutorial 7
PHP Session ISYS 475. Session The web server starts a session when a visitor visiting your web site and assigns a unique id, the session id for the session.
SESSIONS 27/2/12 Lecture 8. ? Operator Similar to the if statement but returns a value derived from one of two expressions by a colon. Syntax: (expression)
PHP and Sessions. Session – a general definition The GENERAL definition of a session in the “COMPUTER WORLD” is: The interactions (requests and responses)
8 th Semester, Batch 2008 Department of Computer Science SSUET.
 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.
ITM © Port,Kazman 1 ITM 352 Cookies. ITM © Port,Kazman 2 Problem… r How do you identify a particular user when they visit your site (or any.
1 PHP HTTP After this lecture, you should be able to know: How to create and process web forms with HTML and PHP. How to create and process web forms with.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 3 PHP Advanced.
Cookies and Sessions in PHP. Arguments for the setcookie() Function There are several arguments you can use i.e. setcookie(‘name’, ‘value’, expiration,
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Sessions and cookies (part 2) MIS 3501, Fall 2015 Brad N Greenwood, PhD Department of MIS Fox School of Business Temple University 11/19/2015.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
Programming for the Web Cookies & Sessions Dónal Mulligan BSc MA
© Copyright 2012 Hidaya Trust (Pakistan) ● A Non-Profit Organization ● / www,histpk.org Hidaya Institute of Science & Technology
The need for persistence Consider these examples  Counting the number of “hits” on a website  i.e. how many times does a client load your web page source.
Cookies Tutorial Cavisson Systems Inc..
CHAPTER 5 SERVER SIDE SCRIPTING
19.10 Using Cookies A cookie is a piece of information that’s stored by a server in a text file on a client’s computer to maintain information about.
Chapter 19 PHP Part III Credits: Parts of the slides are based on slides created by textbook authors, P.J. Deitel and H. M. Deitel by Prentice Hall ©
ITM 352 Cookies.
Client / Session Identification Cookies
Web Programming Language
Cookies and Sessions in PHP
14-мавзу. Cookie, сеанс, FTP и технологиялари
<?php require("header.htm"); ?>
Web Programming Language
Cookies and Sessions.
Web Programming Language
Presentation transcript:

Webpage and database design for Chia-Yao Chien

Motivation The fundamental concept behind Hosanna Broadcasting Network (HBN) is to target the most dynamic emerging markets on earth: Africa, the Middle East, Europe and India. HBN is the first and only Christian radio network to market with a wide range of coverage. HBN is dedicated to bring the message of Jesus Christ to the under-served areas via high quality digital satellite radio to parts of the world that have not been penetrated by the gospel.

Theory Basically the website is built on a server company called ”startlogic”. They allow clients to access the database using phpmyadmin and php webpages.

Design Login page Register Form for first time user Forgot ID Forgot password After Login – Chat room – Guestbook

Design Administrator page – asc/desc order – able/disable user – – Newletters

Design Blog – Entry/re-entry for the content – Blog display page – Calendar mode for the blog – Favorites – Contact

Session( ) Session support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site. How to access it – session_start() – $_session[‘save_this’] = $save_this_one;

Session( ) How to read the data from session – session_start() – $save_from_prev_page = $_session[‘save_this’]; Note: php cannot output ANYTHING before calling session_start(), (or other functions that need to send headers, like cookie setting).

Cookie( ) setcookie() defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including and tags as well as any whitespace.

Cookie( ) How to us cookie <?php $value = 'something from somewhere'; setcookie("TestCookie", $value); setcookie("TestCookie", $value, time()+3600); /* expire in 1 hour */

Cookie( ) setcookie("TestCookie", $value, time()+3600, "/~rasmus/", ".example.com", 1); ?> – Path The path on the server in which the cookie will be available on. – Domain The domain that the cookie is available. – Secure Indicates that the cookie should only be transmitted over a secure HTTPS connection.

Cookie( ) Access cookie – echo $_COOKIE["TestCookie"]; – if($_COOKIE['name'] == null){ die; } Delete cookie – setcookie ("TestCookie", "", time() );

Blog Give and initial date, and if the current date < initial date, go to the initial date, else, go to the current. Use $_GET['date'] to get the date on the url Flipbar output the url with dates

Blog $today = date('Ymd'); if (isSet($_GET['date'])) { if ($_GET['date'] < $initial_entry_date) { // Go to first entry if the specified date is earlier than range $date = $initial_entry_date; } elseif ($_GET['date'] > $today) { // Go to last entry if specified date is later than range $date = $today; } else { $date = $_GET['date']; } } else { $date = $today; }

Blog $prevdate = $date - 1; $nextdate = $date + 1; if ($date == $initial_entry_date) { $flipbar = "\n Next -- > \n"; } elseif ($date == $today) { $flipbar = "\n \n"; } else { $flipbar = "\n Next --> \n"; }

Blog with Calendar mode Use date() and mktime() calculate the dates for the calendar – $date = mktime (0, 0, 0, $month, $date, $year); – $actualDate = date(“m-d-y", $Febdate2[$i]); In sql query, take out all the dates that matches with the month of the page

Calendar Mode