Welcome to Gaia! :: View User's Journal | Gaia Journals

 
 

View User's Journal

Report This Entry Subscribe to this Journal
ronald5salas1 Journal ronald5salas1 Personal Journal


ronald5salas1
Community Member
avatar
0 comments
PHP form inserts data into CSV file
Today we are going to use a .csv (comma seperated values) file to store values from an online PHP web form.

A .csv file is a file that you can create easily with Microsoft Excel (further knowledge is beyond the scope of this tutorial).

Okay, first off we will use the multi-purpose page technique from Build Database Driven Website Using PHP and MySql.

We aren't using a database, we are going to use Excel in .csv form to store the form data.

Why do this when you can use a database?

Data is portable

Data is readily readable by MS office

Data is web ready

Web hosting is simple, FTP and done.

Since my server location is offline, email me for the src code, sorry.

First we create a simple form:

form id="form1" name="form1" method="post" action="?=$_SERVER['PHP_SELF'];?"

table class="formatTblClass"

tr

th colspan="6"?=$message;?/th

/tr

tr

td width="68"spanFirst Name/span/td

td width="215"input class="?=$aClass;?" type="text" name="fn" id="fn" //td

td width="62"spanLast used in conjunction with email, storing in a db, and storing this in a regular text file. The limit is your imagination.

Please be sure to leave any questions or comments you may have about this, and enjoy your projects!

http://alpho011.hubpages.com/hub/PHP-form-inserts-data-into-CSV-file




 
 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum