472,973 Members | 2,485 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

Getting started saving form data to a CSV file and/or database.

Can anyone help me with a form I'm trying to make? I'm trying to make a submission form for my school's literary magazine. I need to put the submitted information into a database. I know I need to use PHP to process the form data, but can someone tell me how? I've read about using MySQL, but I want to keep this as simple as possible. Can I just put the information directly into an excel database? Or do I have to put the information into a CSV file that can be imported into excel?

Another part of the submission form is that it needs to be able to put files into the database as well, which I think complicates things.

Thanks a bunch!
Aug 25 '07 #1
3 2370
IMHO using database is by far the easiest solution, after you cover some basics first.
Use this as reference http://www.php.net/manual/en/ref.mysql.php

Pay attention to functions:
mysql_connect(), mysql_select_db(), mysql_query() and mysql_close()
you'll be using them in that order...

And if you need an easy to install server to test those things you might wanna try this one: http://www.apachefriends.org/en/xampp.html

As for a more detailed tutorial, just google it, there are tons of introductory texts for this kind of thing you're trying to do.
Here's a couple:
http://www.php-mysql-tutorial.com/
http://www.php-mysql-tutorial.com/mysql-insert-php.php
http://www.w3schools.com/php/php_mysql_insert.asp


May the source be with you!
Aug 25 '07 #2
Atli
5,058 Expert 4TB
Hi, and welcome to TSDN!

You could take a look at these two articles I wrote. One deals with Forms and PHP, the other deals with the basics of MySQL databases.

- Using Forms to pass data to PHP
- MySQL Basics

There is also a lot of information on this subject floating around the net, a simple google search will most likely provide a list of good tutorials and discussions.

And, as always, if your having any problems with your code, we will do our best to help you out.
Aug 25 '07 #3
pbmods
5,821 Expert 4TB
Heya, Phoenix. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles contain phrases such as, 'help' actually get FEWER responses?).

If you really don't want or need to use a database, you can output your data as a CSV file. Have a look at fputcsv().
Aug 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: PHPkemon | last post by:
Hi there, A few weeks ago I made a post and got an answer which seemed very logical. Here's part of the post: PHPkemon wrote: > I think I've figured out how to do the main things like...
2
by: Timo J | last post by:
Hi - Im sitting and trying to understand this OOP - and need to create a class wich can do the following.. ShowBlocks() - Displays the data wich is inside it - If empty creates a form wich sends...
0
by: Jim | last post by:
I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the...
0
by: Jim | last post by:
This si a repost, I apologize but perhaps my original inquiry got buried under all the usenet spam... I need some help getting started with a .NET web project for a commercial site. I am new to...
6
by: Jack Duijf | last post by:
Hello, I am looking for a person in The Netherlands that is willing to help me getting started with Vb.net. Please send a message to jack@aicn.nl if you can help me getting started with the...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
7
by: Dave Kelly | last post by:
There has to be a name for what I want to do and I don't know what words to google for. I have a form here: http://www.texasflyfishers.org/firstpage.htm I want to submit it to the server and...
6
by: sathyashrayan | last post by:
Dear Group, Please look at the following demo link. http://www.itsravi.com/demo/new_pms/admin/addproject.php
3
by: pozze | last post by:
Hi, I've just made the change from ASP to .net. I have a file (code below) that saves a user submitted file to a MS SQL 2005 database. It collects the file name, file size, file type, and lastly...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.