*** The Problem ***
I run a website and I have people fill out a join form to become a member. After i recieve the form via email I have to manually add them to a members page.
I would like to have a join form store the users name and email address. Then I would like an admin to be able to accept the form and select which section of the members page to add the user to.
After the admin accepts the user and decides where to add the new member to I would like the information to be added automatically to a table on the members page.
*** What Im looking For ***
If someone could point me to a tutorial on some of these features that would be great. Or if some one could just explain a simple way of doing this so I can learn and do it myself.
Thank you in advance
Well the only question I have first is what do you mean by post it to the members page? Is it an html page, a dynamic page driven from a db/text file?
I will make some assumptions. Say you have a form that gets member info and dumps it to a db. When all of the info is inserted it can have a flag (yes/no column) that controls wether it is displayed or not. When the member page is displayed dynamically from the db it will only get member info for members with that column set to yes. All the admin has to do is set that column to yes and it will show up on the page.
As far as if there are seperate categories then the admin can add a value to a "category" column and then set it to yes in the display field and voila, it works.
If that is not the present method then maybe you could explain a little more about the destination page and the sections you talked about and I could give you a little better direction.
Assuming you're using a MySQL database.
I would have the prospective member's form fill in the database and upon a succesful post to the db I would have the script email you that a new member has joined.
The member's db would have two additional fields beyond the information necessary for the table you mentioned. One for indicating that you've accepted their membership and one for indicating which category they belong to.
When an admin logs in, they can query the db for all new members (anyone with a 0 or NULL in the "accepted" field). Review their record and accept them by checking off a checkbox. Indicate what category they belong by selecting one from a dropdown list and then post the form.
On the presentation side, you'll need to sort out the members by their categories. There are a number of ways to accomplish this. I would use GROUP BY [mysql.com...] & [mysql.com...] in the query and then test the array as I looped through it for a change of the category. But there are many "ifs" so don't be surprized if someone has a different answer or you develop a different solution yourself.
Sorry my post was not more clear. You know how its when its 2 a.m. and you can't figure your problem out heh, you forget things :(
I'll try to be more precise. I am working with PHP 4.2.0
and MySql 3.23.25. I've been using other people's php scripts for about 3 months and have decided that I need to be able create my own php scitpts to fit my needs.
I have spent a little over a week learning php now. i spend about 6 hours a day learning. I am able to understand ALOT of whats going on now though :) Though my biggest probelm is actually using my knowledge to construct something. Learning all the functions is great but I need alot of work in the theory department I guess.
Now to the question.
From what I gather I would need three .php pages. A join form, a members page, an admin page. On top of that I would need to create a table in a MySql DB.
Now the join form for all intents and purposes, I really only need to collect their name and email address. If I would want other information I could probally add that after I get a working version going easily.
For the Members page, I would like to add the join form data to a table like this one
<snip>
For the admin page, I would like an admin to be able two things. 1. Add members whom submitted a join form and 2. promote current members up in ranks.
After reading both replies to my first post you both have given me a good idea on how to start constructing this. If you feel that you could supply more information for me or any tutorials on these subjects that would be great. I have to do some reading and learn some MySql to be able to create a table for this project. But other than that I should be start work on this later today. Thank you both very much.
Learning php is like learning to drive a car. At first you have to concentrate alot on your shifting. After awhile though you don't need to concentrate on the shifting and can pay more attention to driving.
I still paying attention to shifting hehe,
Thank you though
[edited by: jatar_k at 6:44 am (utc) on Oct. 18, 2002]
[edit reason] sorry no urls see TOS [/edit]
[devshed.com...]
[hotwired.lycos.com...]
[php.net...]
[phpcomplete.com...]
I'd also recommend you locate a copy of this book:
[bookpool.com...]
as I found it to be most helpful. I doubt any of these will hit the nail on the head but in combination with experimentation you should get everything you need.
Best O'Luck