Web Programming Week 4 Old Dominion University

Slides:



Advertisements
Similar presentations
Document Management System for Rhodes University Supervisor: John Ebden Presenter: Bijal Rana.
Advertisements

NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
Web Programming Week 1 Old Dominion University Department of Computer Science CS 418/518 Fall 2007 Michael L. Nelson 8/27/07.
Web Programming Week 14 Old Dominion University Department of Computer Science CS 418/518 Fall 2006 Michael L. Nelson 11/27/06.
C.R.U.D. Charles Severance
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Collective Intelligence Week 7: Decision Trees
Web Programming Week 3 Old Dominion University
Web Server Design Assignment #4: Authentication
BASIC PHP and MYSQL Edward S. Flores.
PHP Overview PHP: Hypertext Preprocessor Server-Side Scripting
HTML Tables CS 1150 Fall 2016.
Introduction to Information Retrieval Week 1: Administrivia
Web Programming Assignment #1: Basic BBS Operations
Introduction to Digital Libraries Assignment #1
Web Server Design Assignment #5 Extra Credit
Economics of Information Week 1
Introduction to Digital Libraries Assignment #4
Web Programming Week 14 Old Dominion University
Introduction to Digital Libraries Assignment #3
Introduction to Digital Libraries Assignment #4
Web Server Design Week 15 Old Dominion University
Web Programming Assignment #1: Basic BBS Operations due: 9/28/2010
Introduction to Digital Libraries Assignment #2
Web Server Design Week 16 Old Dominion University
Web Programming Assignment #4: Searching, Notification & Upload
Web Programming Week 8 Old Dominion University
Introduction to Digital Libraries Assignment #3
Introduction to Digital Libraries Assignment #3
Web Server Design Assignment #2: Conditionals & Persistence
Old Dominion University Department of Computer Science
Web Programming Assignment #2: Expanded BBS Features
Web Programming Assignment #2: Expanded BBS Features
Web Programming Week 14 Old Dominion University
Web Programming Week 7 Old Dominion University
Web Programming Week 3 Old Dominion University
Web Programming Week 4 Old Dominion University
Introduction to Digital Libraries Assignment #2
Introduction to Information Retrieval Assignment #3
Introduction to Digital Libraries Assignment #3
Peer-to-Peer Information Systems Week 14: Assignment #6
Web Server Design Week 11 Old Dominion University
Web Programming Assignment #3: Admin and User Functions
Web Programming Assignment #4: Searching & Notification
Web Programming Assignment 4 - Extra Credit
Technologies of Google Seminar Week 1
Web Programming Assignment 4 - Extra Credit
Web Server Design Week 14 Old Dominion University
Web Programming Assignment 4 - Extra Credit
Web Programming Week 3 Old Dominion University
Introduction to Digital Libraries Assignment #2
Web Programming Assignment #1: Basic BBS Operations
Peer-to-Peer Information Systems Week 6: Assignment #3
Introduction to Digital Libraries Assignment #3
Introduction to Digital Libraries Assignment #3
Peer-to-Peer Information Systems Assignment #2
Web Server Design Assignment #5 Extra Credit
Web Programming Assignment #1: Basic BBS Operations
Introduction to Digital Libraries Assignment #1
Peer-to-Peer Information Systems Assignment #5
Peer-to-Peer Information Systems Week 12: Assignment #5
Introduction to Digital Libraries Assignment #1
Web Programming Week 1 Old Dominion University
Peer-to-Peer Information Systems Week 7: Anonymity Part 2
Introduction to Digital Libraries Assignment #4
Introduction to Digital Libraries Assignment #1
Introduction to Digital Libraries Assignment #2
Web-Based Information Retrieval Week 2: Administrivia
Web Programming Assignment #3: Admin and User Functions
Web Programming Assignment #2: Expanded BBS Features
Presentation transcript:

Web Programming Week 4 Old Dominion University Department of Computer Science CS 418/518 Fall 2006 Michael L. Nelson <mln@cs.odu.edu> 9/18/06

HERE document … echo "<title>Go Hokies</title>"; echo "<h1>Hokies rule!</h1>"; echo "<p>"; echo "Frank Beamer is the best coach ever!"; echo "<br>" echo "VT is going to crush $next_opponent!!!" … $hokies<<<SOMETOKEN <title>Go Hokies</title> <h1>Hokies rule!</h1> <p Frank Beamer is the best coach ever! <br>" VT is going to crush $next_opponent!!! SOMETOKEN; echo $hokies;

Neat Usage of HERE <?php … // some code to assemble $header_message // lots of code to assemble $main_message // some code to assemble $footer_message echo $header_message; echo $main_message; echo $footer_message; ?>

Tables Season Record (W-L) <table> <tr> <th>Season</th> <th>Record (W-L)</th> </tr> <td>1993</td> <td>9-3</td> <td>1994</td> <td>8-4</td> … <td>2005</td> <td>11-2</td> </table> Season Record (W-L) 1993 9-3 1994 8-4 1995 10-2 1996 1997 7-5 1998 1999 11-1 2000 2001 2002 10-4 2003 8-5 2004 10-3 2005 11-2

Forms <a href="url2?var1=a&var2=b">click me</a> URL1 URL2

Single URL, Run-time Inclusion <?php … if ($_REQUEST['action'] == "edit") { require "edit.php"; }elsif ($_REQUEST['action'] == "add") { require "add.php"; }elsif ($_REQUEST['action'] == "delete") { require "delete.php"; } else { require "initialpage.php"; } ?> URL1 <form action="url1" method=post> … <input type=radio name=action value=edit> <input type=radio name=action value=add> <input type=radio name=action value=delete> </form> <?php if ($_REQUEST['action'] == "") { require "initialpage.php"; } else { require $_REQUEST['action'] . "php" or die "unknown action!"; } ?>