Back to DFS's Workshop Page
Back to Agenda Page
Back to the Project Page


Editing Data in a File

For this problem, you are to cannibalize any available code and write a trio of scripts which will do the following.

The First PHP Script: editaplayer1.php

The Second PHP Script: editaplayer2.php

  1. Display all of the desired player's data in a form, allowing the user to retype any or all of the data.
  2. Use the "hidden" value for the type attribute of an input tag in the form to pass the position of the record in the file.
  3. Using the "Store Changes" button, send the number of the selection and the player's updated data to a PHP script called editaplayer3.php.

The PHP Script: editaplayer3.php

  1. Read the data in from the file.
  2. Replace the record that has been edited.
  3. Write the data to the file.
  4. Read the data back in from the file and display it in a table.

Check out this solution.


© 2006 DFStermole
Created 20 Nov 06
Last Modified 26 Nov 06