deschai5 Posted November 28, 2007 Share Posted November 28, 2007 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 More sharing options...
dennismonsewicz Posted November 28, 2007 Share Posted November 28, 2007 Hey bud, try this site... http://www.tizag.com/phpT/filewrite.php Hope this helps, Dennis Link to comment https://forums.phpfreaks.com/topic/79329-a-very-simple-form/#findComment-401555 Share on other sites More sharing options...
revraz Posted November 28, 2007 Share Posted November 28, 2007 Does your webhost also provide you with a MySQL DB? Link to comment https://forums.phpfreaks.com/topic/79329-a-very-simple-form/#findComment-401563 Share on other sites More sharing options...
deschai5 Posted November 29, 2007 Author Share Posted November 29, 2007 Does your webhost also provide you with a MySQL DB? Yes, both 4.1 and 5.0 Link to comment https://forums.phpfreaks.com/topic/79329-a-very-simple-form/#findComment-401631 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.