Back to DFS's Workshop Page
Back to Agenda Page
Back to the Project Page
Appending Data to a File
For this problem, you are to cannibalize any available code and write a script which will do the following.
The HTML Page: addaplayer.html
- Ask the user for a player's first and last names, at bats and hits using an HTML form.
- Using the "Append" button, send the data to a PHP script called addaplayer.php.
The PHP Script: addaplayer.php
- Check the data received to ensure that the values are possible; use die or exit to report problems and terminate execution.
- Using the trio of functions, fopen, fwrite, and fclose, to append the new data to the data file created in the previous problem.
- Display the data now in the modified file in a table as done in the previous problem.
Check out this solution.
© 2006 DFStermole
Created 19 Nov 06
Last Modified 26 Nov 06