Forums

PHP

This topic is locked

Multipage Form

Posted 27 Nov 2006 01:56:34
1
has voted
27 Nov 2006 01:56:34 Ken Dobbins posted:
I am totally new to PHP i have figured out how to make a series of forms on different pages I am needing to know how to a couple things. first thing is i need to find out how to insert their userid into each page and the next is on the work history page i need to find out how to make it where they can put in multiple pages of the smae info linking this back to the same user id. I am working on this to put it out on sourceforge and open source all of this. I would appreciate any input you have.

Replies

Replied 27 Nov 2006 06:14:15
27 Nov 2006 06:14:15 Alan C replied:
I needed something similar for login and keeping track of visitors. I looked all over for a good ready-written script that would manage my users, there are some that would do it, but they were too expensive or had links back to someone else's site. Another way I considered was to take something like a weblog system or bulletin board and rip that apart, just keeping the bits I wanted. In the end I decided that was too much work.

I started with the coding you'll find here

www.evolt.org/article/PHP_Login_System_with_Admin_Features/17/60384/index.html

I really recommend this as a starting point, then I disected the code to see exactly what it did, it was a big learning exercise, but in doing it I leant about objects, sessions, cookies and more.

Your second question sounds like database design to me, I think you want the work history to go into a table using a 'foreign key' - being the userid from the main table. Then you can perform a select on the second table using the userid from the first table as the key.

That way you can have as many history pages as needed. It's a classic one to many relationship where one user can have zero, one or many work histories associated with it. Before you go much further it would be worth doing some research on data normalisation if you haven't already done it.

Reply to this topic