Page 1 of 1

very simple online registration form

Posted: Tue Dec 30, 2008 6:21 am
by tinoda
Friends, I have tried my best to use all the php knowledge i have to try create an online registration but I seem not to succeed. I have tried using serialize(), reading and writing to files, session cookies, etc but i cant seem to win. Now the system I need is like this: A user enters ONLY his or her name and after pressing submit the form clears as well as the submit button and their name automatically gets displayed on a table cell which is lets say below or on top of the form. Since this is a small thing I need to do it without using databases. please help

Re: very simple online registration form

Posted: Tue Dec 30, 2008 1:08 pm
by califdon
tinoda wrote:Friends, I have tried my best to use all the php knowledge i have to try create an online registration but I seem not to succeed. I have tried using serialize(), reading and writing to files, session cookies, etc but i cant seem to win. Now the system I need is like this: A user enters ONLY his or her name and after pressing submit the form clears as well as the submit button and their name automatically gets displayed on a table cell which is lets say below or on top of the form. Since this is a small thing I need to do it without using databases. please help
There are, conservatively, a hundred ways to do that. It would be better if you told us directly what you are trying to accomplish, not the specifics of how you think you want to implement it. There will most likely be much better ways to achieve your end purpose than the way you described it.

Re: very simple online registration form

Posted: Tue Dec 30, 2008 1:18 pm
by omniuni
While I agree, there is likely a "better way" I think I can throw together something simple without a DB from code I have. I have written most of a flat-file CMS, so I'm used to working without DB's. If you just want to make their name appear on the page for the duration of them being on the web site, you can use sessions, otherwise, if you'll want them to be able to "log in" again or retrieve their data, a serialized array should do the trick.

Which one is it? I'll try to post some code.

Re: very simple online registration form

Posted: Tue Dec 30, 2008 2:12 pm
by califdon
You seem to have a grasp on what you're doing, so what is your question? Apparently you only want to display a value that a user inputs on the first page, to appear on subsequent pages during their session, correct? That's what I meant by explaining what you want to achieve. If that's correct, then, as you said, the $_SESSION variable would be the easiest way to go. What have you tried in this regard, that doesn't work?