This is an example on how to extract the values that are entered in an HTML form and save these into a tab-delimited text file on the server. The date & time and the IP-address of the user submitting the form are also stored in the file.
You can open this page in PageSpinner to view the PHP code that performs these actions.
Enter some text in the following fields and click the Submit button:
} else { $theComment=$_POST[Comment]; $theName=$_POST[Name]; echo("Thank you, have entered the following:
");
echo("Comment: ". $theComment ."
");
echo("Name: ". $theName ."
Your comment has been stored in the database.
"); echo(''); } ?> See:
Form Access Introduction for info on how to process the data in the form
File Handling Introduction on how to store data in a text file
Displaying current date and time on how to get the current date and time
IP-Address Detection on how to get a users IP-adress
This PHP code example is copyright © 2002-2003 Optima System. All rights reserved worldwide. Unauthorized distribution prohibited. SpinPHP™ User License.