Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Using PHP to create sign up list

Posted on 2007-11-17
4
394 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:d343seven
  • 2
4 Comments
 
LVL 21

Expert Comment

by:nizsmo
ID: 20306668
Here are 2 very nice tutorials about file writing in php:
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.
0
 
LVL 11

Accepted Solution

by:
AlexanderR earned 95 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
http://www.designdetector.com/archives/04/10/FlatFileDatabaseDemo.php)

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.
http://devzone.zend.com/node/view/id/760
http://php.net/manual/en/ref.sqlite.php
0
 

Author Comment

by:d343seven
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
0
 
LVL 21

Assisted Solution

by:nizsmo
nizsmo earned 30 total points
ID: 20310570
Try chmodding the directory or file to 755 or 777:
http://au3.php.net/chmod

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Installer 5 37
Split wordpress loop 35 56
PHP Soap Server returning XML but < & > as &lt; / &gt; 9 45
Delete  php pages of a part of our site 8 31
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

839 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