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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.