Jump to content

A Very Simple Form


deschai5

Recommended Posts

Hello everyone, I'm new here.

 

I am thinking of trying to set up a very simple form for people to preregister to an upcoming event.  This to save the time; the alternative is to create a gmail account and have people send emails to that. 

 

Anyway, I am an beginner PHP programmer, but I have a lot of experience with object oriented programming in general (mostly C and c++).  I think I'll be able to pick up the language fairly quickly.  I'm looking for some help getting started here.

 

Here's what I've got in mind.  I would create some simple html form where people put their name, age and number of guests they are bringing.  Something like:

 

<form action="action.php" method="post">

<p>Your name: <input type="text" name="name" /></p>

<p>Your age: <input type="text" name="age" /></p>

<p>Number of guests: <input type="text" name="guests" /></p>

<p><input type="submit" /></p>

</form>

 

Then I would somehow need to to send that data to a file (a text file would be fine) and add that person's information to the file.  How would I accomplish this?  I know I would probably need to use the functions fopen(), fread(), fwrite() feof(), fclose() and the test functions file_exists() and is_writable().  I already have web hosting set up.

 

Any help would be great!

Link to comment
https://forums.phpfreaks.com/topic/79329-a-very-simple-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.