Using PHP to create sign up list

Posted on 2007-11-17
Medium Priority
Last Modified: 2012-06-27

I am trying to make a webpage sign up list (for example, users can logon and sign their name up under specific activities).  The website that I am putting this under has a members section and requires a login.  I was hoping to make a sign up list using php where the currently logged in user could sign his/her name (and only his or her name...although if this is difficult, its ok, since security shoudln't be a problem) into text boxes under specific events and click a "Save" button.

Is it correct to say that php should be the language used since it is serverside and for what I want to do, I need to store data on the server?  I was hoping to just store the data in a text file on the server (no database stuff) to keep it simple and upon loading the website, it will load the data and when a user clicks "Save" it will update that text file.

Can someone give me some pointers/starting code/php commands (what is the way to tell the name of the currently logged on user?) so that I can do this?

Thanks in advance!
Question by:d343seven
  • 2
LVL 21

Expert Comment

ID: 20306668
Here are 2 very nice tutorials about file writing in php:

thouogh personally in my opinion i think that storing and writing/reading from the database is going to be easier.
LVL 11

Accepted Solution

AlexanderR earned 380 total points
ID: 20309584
If you dont want to use a big database server/software for something small then you can either use a flat-file technique (basic idea is at

Or you if you need something a bit more sophisticated use SQLite which is also flat file based but is capabale of most basic SQL language features.

Author Comment

ID: 20310560
Ok, I am trying to use fwrite...but it is not writing onto a file onto the server.  Is there something special I need to do to do this?  It doesn't give an error, but I also don't see the data being written
LVL 21

Assisted Solution

nizsmo earned 120 total points
ID: 20310570
Try chmodding the directory or file to 755 or 777:

you may not have enough permission to write to the file/folder.

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question