Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.

Slides:



Advertisements
Similar presentations
PHP Form and File Handling
Advertisements

PHP File Upload ISYS 475.
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
FILE UPLOADS CHAPTER 11. THE BASIC PROCESS 1.The HTML form displays the control to locate and upload a file 2.Upon form submission, the server first stores.
Uploading Files. Why? By giving a user the option to upload a file you are creating an interactive page You can enable users have a greater web experience.
Digital Media Webspace Publishing Quick Start. 1. Login to Webspace using your UT-EID and password at:
PHP and SQL Server: Queries IST2101. Project Report 4 SQL Queries Due Sunday, 4/5 at 11:59pm Instructions on how to access team webspace and SQL database.
The 12 screens to follow contain a number of Tool descriptions, some instructions on their use, and in some cases a Task or two. If you dedicate one hour.
U NIT 4 F ILE U PLOAD. I. C REATE AN U PLOAD -F ILE F ORM - With PHP, it is possible to upload files to the server.To allow users to upload files from.
1 Spidering the Web in Python CSC 161: The Art of Programming Prof. Henry Kautz 11/23/2009.
Web Design Dreamweaver Semester 2 ATBs. ATB #1 What is a web site?
Week 4  Using PHP with HTML forms  Form Validation  Create your own Contact form Please Visit:
Agenda9/11/13  Do Now  Display your name tag and log into your computer  Pre-Assessment Test  Info and Interests  Syllabus and Course Expectations.
INTRODUCTION TO DREAMWEAVER 8. What we already know…  Design basics  Contrast  Repetition  Alignment  Repetition  HTML.
1 Project 7: My Photo Album Graded Project. 2 Assignment Write a web app to permit users to upload and view photos. User can keep up to five photos on.
September 10, Agenda Welcome Updates Reminders New CT.gov Site Questions & Comments.
Lecture 7 Interaction. Topics Implementing data flows An internet solution Transactions in MySQL 4-tier systems – business rule/presentation separation.
Web Design Unit Assignment #2: Job Skills Favorite Links Page You will create a HTML web page with links to informational websites about a variety of job.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
1 Project 4: XML Product Browser (Not Graded). Objectives This project is an exercise of the following knowledge and skills: Accessing and displaying.
Agenda9/11/13  Do Now  Display your name tag and log into your computer  Pre-Assessment Test  Info and Interests  Syllabus and Course Expectations.
WEB DESIGN UNIT 2 Unit 2 Module 2-5. WHAT HAVE YOU LEARNED?  What is the title tag do? Where does it show?  What are the tags that need to be on every.
Agenda – Week 6, Day 2 Revisit where we’ve been: –HTML and Dreamweaver Other Cool things in Dreamweaver –Tables and Imagemaps Finishing the Tutorial –Returning.
SE3183 Advance Web Programming Programming Session 2013/2014.
1 Midterm Review. 2 Midterm Exam  30% of your grade for the course  October14 at the regular class time  No makeup exam or alternate times  Closed.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Polling System Part 1 Creating PHP & MySQL Files CIS 254.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
How to upload files to Altervista Overview:
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
INP 150: Basic HTML Term: Winter 2002 Section: H1 Time: Mon/Wed 5:30- 7:25 pm Place: TI237 Instructor: Paul J. Millis.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
CIS166AE : PHP Web Scripting Rob Loy. Tonight’s Agenda Housekeeping items Housekeeping items PHP basics PHP basics Student connection to server Student.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Put your assignment on the page. Embed a document for students to complete and send back to you. Have students complete the document and submit it to.
Creating databases for web applications Library. New example: student database. Homework: Complete class example. Catch up on source postings. Do creation.
CPSC 203: Introduction to Computers Tutorials 03 & 29 by Jie (Jeff) Gao.
Go to your school’s web locker site Your user name is the first letter of your first name, the first four letters of.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Storing and Retrieving Data
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
Advanced Web 2012 Lecture 6 Sean Costain Files Sean Costain 2012 Php allows for the : Creation Reading Appending Deleting Uploading And Closing.
CST336, Spring 2015 Week 8: PHP File Upload. PHP provides specific functions to handle binary data such as uploading a file into the server, storing it.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
PHP Form Processing * referenced from
Company LOGO In the Name of Allah,The Most Gracious, The Most Merciful King Khalid University College of Computer and Information System Web pages Development.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Media Access online media sharing ECE 3553 Multifarious Systems Cary Fung December 7, 2007.
Lindsey Velez, Director of Instructional Technology Single Sign-On One Click.
Unit 7 How to Upload Files. A very useful aspect of PHP is its ability to manage file uploads to your server. Before you can use PHP to manage your uploads,
PHP File Handling. Opening a file Fopen(filename,mode) Closing a file Fclose(filename)
Programming for the Web Assignment One Dónal Mulligan BSc MA
SCC P2P – Collaboration Made Easy Contract Management training
Web Engineering Lecture-08.
CISC103 Web Development Basics: Web site:
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
EDSS 511 Session 14 Dec 1, minutes
PHP / MySQL Introduction
Handling Files In particular, uploading files.
Configuring Internet-related services
PHP and Forms.
Handling Files In particular, uploading files.
Dreamweaver.
Presentation transcript:

Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy

Agenda Assignment recap Assignment recap File upload File upload Directory functions Directory functions MyFallColors project MyFallColors project

Rest of Semester Nov 7 – File and Directory functions Nov 7 – File and Directory functions Nov 14 – Error/Security [PRESENTATIONS] Nov 14 – Error/Security [PRESENTATIONS] Nov 21 – PHP Applications?? Nov 21 – PHP Applications?? Nov 28 – OOP [QUIZ] Nov 28 – OOP [QUIZ] Dec 5 – Web Services/SOAP Dec 5 – Web Services/SOAP Dec 12 – Open Lab Dec 12 – Open Lab Dec 14 – Projects Due!! Dec 14 – Projects Due!!

File Upload (html) </form>

File Information (php) // File upload error $_FILES["file"]["error"] // Actual file name $_FILES["file"]["name"]; // File type $_FILES["file"]["type"]; // File size in bytes $_FILES["file"]["size"]; // File tmp location and name $_FILES["file"]["tmp_name"];

File Upload (php) // Folder need to have permission 777 $local = “files/”; if (file_exists($local. $_FILES["file"]["name"])) { echo $_FILES["file"]["name"]. " already exists. "; }else{ move_uploaded_file($_FILES["file"]["tmp_name"], "files/". $_FILES["file"]["name"]); }

File Upload (security) 1.Assign 775 permission to upload folder 2.Disable directory indexes and script exection using.htaccess 3.Place the upload folder outside WWW root 4.Check for type of file upload and deny uploading other files 5.Restrict its size 6.Verify image using getimagesize() function with PHP 7.Create random files names using md5() 8.Use DB to store file information 9.chown the writable folder to apache or nobody and assign 770 permission

File Read (php) $dir = “files/";if (is_dir($dir)) {if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { while (($file = readdir($dh)) !== false) { echo "filename: $file; } closedir($dh); }}

Questions?

Presentation Two Pick a current article from 2012 around any Internet, programming or Web topic Pick a current article from 2012 around any Internet, programming or Web topic Prepare a 2-3 minute talk which you will do from your chair – if you need the project you can present from the front of the classroom Prepare a 2-3 minute talk which you will do from your chair – if you need the project you can present from the front of the classroom You will be presenting on November 14. You will be presenting on November 14.

Assignment 4 Update the “colors” project to add the following fields to the gallery: Update the “colors” project to add the following fields to the gallery: State of photo (AZ, AL, AR, AK …) State of photo (AZ, AL, AR, AK …) Date of photo (12/01/2012) Date of photo (12/01/2012) Description of photo Description of photo You will to make updates to the DB table, the gallery display page and the submit photo page. You will to make updates to the DB table, the gallery display page and the submit photo page. URL to by Nov 14 at 6:00pm URL to by Nov 14 at

Final Project Create a PHP website using pieces of code and modules we learned in class Create a PHP website using pieces of code and modules we learned in class Make the site look like a finished product that you can share as a indication of your skills Make the site look like a finished product that you can share as a indication of your skills You will be graded on looks, details and demonstration of php knowledge You will be graded on looks, details and demonstration of php knowledge Send to with URL to input form file before 6pm on Dec 14. Send to with URL to input form file before 6pm on Dec