Exercises

  1. Create a form that accepts a user’s first and second name. Create a script that saves this data to a file.

  2. Create a script that reads the data file you created in exercise 1. As well as writing its contents to the browser (adding a -<br /> tag to each line), print a summary that includes the number of lines in the file and the file’s size.

Get Sams Teach Yourself PHP in 24 Hours, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.