View Full Version : PHP contact form -> comma separated text file

11-18-2003, 07:02 AM
Is it posssible to have a php create a text file and output the values from a contact form to it? If so, how simply :confused:

11-18-2003, 01:17 PM
That's possible and not quite hard. You need to get the data sent through the contact form, validate it, and upon successful validation you store them in the text file.

Have a look at form processing ($_POST, $_GET) and file writing, especially

fopen() - http://www.php.net/manual/en/function.fopen.php
fwrite() - http://www.php.net/manual/en/function.fwrite.php
fclose() - http://www.php.net/manual/en/function.fclose.php

There is lots of sample code in the maunal, particularly in the user notes to each function involved.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum