Current location: Hot Scripts Forums » Programming Languages » PHP » Membership application php help


Membership application php help

Reply
  #1 (permalink)  
Old 11-14-11, 09:22 PM
tsweeneyjr tsweeneyjr is offline
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!
Reply With Quote
  #2 (permalink)  
Old 11-16-11, 01:34 AM
phplabs phplabs is offline
Newbie Coder
 
Join Date: Oct 2011
Posts: 37
Thanks: 0
Thanked 7 Times in 7 Posts
Quote:
Originally Posted by tsweeneyjr View Post
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.
__________________
blog.phplabs.net
Reply With Quote
The Following User Says Thank You to phplabs For This Useful Post:
tsweeneyjr (11-16-11)
  #3 (permalink)  
Old 11-16-11, 09:11 PM
tsweeneyjr tsweeneyjr is offline
New Member
 
Join Date: Nov 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by phplabs View Post
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!
Reply With Quote
  #4 (permalink)  
Old 11-17-11, 05:51 AM
phplabs phplabs is offline
Newbie Coder
 
Join Date: Oct 2011
Posts: 37
Thanks: 0
Thanked 7 Times in 7 Posts
Quote:
Originally Posted by tsweeneyjr View Post
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.
__________________
blog.phplabs.net
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP or PHP which is better? nepala The Lounge 9 07-14-10 05:48 AM
Required Sr. Software Engineers (PHP, MySQL) osscube Job Offers & Assistance 0 09-10-08 07:15 AM
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
Php Mysql Bug??? tranquilraven PHP 4 03-01-06 03:06 AM


All times are GMT -5. The time now is 08:54 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.