Membership application php help

11-14-11, 09:22 PM
|
|
New Member
|
|
Join Date: Nov 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
|
Membership application php help
I'm new to php but decided to jump in head first! I'm currently working on a site for an alumni association. The application page needs to do several things:
1) The applicant completes the form and clicks "submit".
2) The applicant's information is sent to a board member for approval/denial.
3) If the board member approves, the information is entered into a SQL database, an congratulatory email is sent to the applicant, and the applicant's email address is sent to a third party (via email) to be included in a second database.
4) If the board member denies the application, the applicant is sent an email explaining the reason for denial. A the same time, any information entered into the SQL database (if any) is deleted.
Currently, I have the first two steps accomplished. When the form is completed, the board member receives an email with the applicant's info and a link to an html page. On that page, the board member can select to approve or deny the application (via form consisting of two radio buttons). From there, I seem to stall.
Can someone help or is there a better way to perform all the above steps?
Thanks!
|

11-16-11, 01:34 AM
|
|
Newbie Coder
|
|
Join Date: Oct 2011
Posts: 37
Thanks: 0
Thanked 7 Times in 7 Posts
|
|
Quote:
Originally Posted by tsweeneyjr
I'm new to php but decided to jump in head first! I'm currently working on a site for an alumni association. The application page needs to do several things:
1) The applicant completes the form and clicks "submit".
2) The applicant's information is sent to a board member for approval/denial.
3) If the board member approves, the information is entered into a SQL database, an congratulatory email is sent to the applicant, and the applicant's email address is sent to a third party (via email) to be included in a second database.
4) If the board member denies the application, the applicant is sent an email explaining the reason for denial. A the same time, any information entered into the SQL database (if any) is deleted.
Currently, I have the first two steps accomplished. When the form is completed, the board member receives an email with the applicant's info and a link to an html page. On that page, the board member can select to approve or deny the application (via form consisting of two radio buttons). From there, I seem to stall.
Can someone help or is there a better way to perform all the above steps?
Thanks!
|
do you have the data saved to the database in step 2, or are you just emailing the data? what is the thing that makes you stall?
i think in step 2 you should save it into the database, either in a temporary table, or in the same table just with some flag, like a column 'confirmed', so confirmed entries have value 1 and other entries have 0.
so the board member gets the data and the link, similar to .../approve.php?application_id=123. so if the applicant is approved you just update 'confirmed' to 1 for the entry 123, or in case of denial you just delete the entry 123. you just have to check that 'confirmed' column in other scripts, so that unconfirmed members could not log in, etc.
or if you choose to have separate tables, such as 'members' for approved members and 'members_waiting' for new applicants, then on step 3 you either move the entry 123 from waiting table into member table, or delete it from the waiting table.
not sure what the problem was, this was just my guess on what you stopped at.
|
|
The Following User Says Thank You to phplabs For This Useful Post:
|
|

11-16-11, 09:11 PM
|
|
New Member
|
|
Join Date: Nov 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by phplabs
do you have the data saved to the database in step 2, or are you just emailing the data? what is the thing that makes you stall?
i think in step 2 you should save it into the database, either in a temporary table, or in the same table just with some flag, like a column 'confirmed', so confirmed entries have value 1 and other entries have 0.
so the board member gets the data and the link, similar to .../approve.php?application_id=123. so if the applicant is approved you just update 'confirmed' to 1 for the entry 123, or in case of denial you just delete the entry 123. you just have to check that 'confirmed' column in other scripts, so that unconfirmed members could not log in, etc.
or if you choose to have separate tables, such as 'members' for approved members and 'members_waiting' for new applicants, then on step 3 you either move the entry 123 from waiting table into member table, or delete it from the waiting table.
not sure what the problem was, this was just my guess on what you stopped at.
|
Sorry, I should have mentioned that, yes, the info is inserted into a table in step two. I'll have to try adding the "confirmed" column and see if that helps. Thank you so much for the suggestion!
|

11-17-11, 05:51 AM
|
|
Newbie Coder
|
|
Join Date: Oct 2011
Posts: 37
Thanks: 0
Thanked 7 Times in 7 Posts
|
|
Quote:
Originally Posted by tsweeneyjr
Sorry, I should have mentioned that, yes, the info is inserted into a table in step two. I'll have to try adding the "confirmed" column and see if that helps. Thank you so much for the suggestion!
|
you're welcome  i think it should work and as i said, just make sure that confirmed and unconfirmed members don't mix in other parts of the script (i.e. always check where confirmed=1), such as when counting members, or letting them log in, or displaying the member list, etc.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|