d343seven
asked on
Using PHP to create sign up list
Hello,
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!
Daniel
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!
Daniel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.tizag.com/phpT/filewrite.php
http://www.totallyphp.co.uk/code/write_data_to_a_text_file.htm
thouogh personally in my opinion i think that storing and writing/reading from the database is going to be easier.