Page 153 - Open Soource Technologies 304.indd
P. 153
Open Source Technologies Sarabjit Kumar, Lovely Professional University
Notes Unit 9: Working with Forms
CONTENTS
Objectives
Introduction
9.1 Creating a Simple Input Form
9.2 Creating the Form
9.3 Accessing Form Input with User-Defined Arrays
9.4 Combining HTML and PHP Code on a Single Page
9.5 Using Hidden Fields to Save State
9.6 Redirecting the User
9.7 Sending Mail on Form Submission
9.7.1 System Configuration for the Mail() Function
9.7.2 Creating the Script to Send the Mail
9.8 Working with File Uploads
9.9 Creating the File Upload Form
9.10 Summary
9.11 Keywords
9.12 Self Assessment Questions
9.13 Review Questions
9.14 Further Reading
Objectives
After studying this unit, you will be able to:
• Explain creating simple input form.
• Understand creating the form.
• Discuss accessing form input with user-defined arrays.
• Explain combining HTML and PHP code on a single page.
• Discuss hidden fields to save state.
• Understand redirecting the user.
• Discuss sending mail on form submission.
• Explain working with file uploads.
• Explain creating file upload form.
Introduction
Until now, the PHP examples in this book have been missing a crucial dimension. Sure, you
know the basics, can set variables and arrays, create and call functions, and connect to MySQL to
148 LOVELY PROFESSIONAL UNIVERSITY