new_to_php
asked on
Settig Up a survey system in PHP and mysql.. help needed
I have a site where I survey members from time to time. I want members of certain lists to be directed to a survey page/file. The problem is I need to make sure the survey they are directed to is the one related to their lists and is currently active.
I've set up a survey table where I can add the names of the surveys and file names and even paths and the list Id numbers they are associated with I call that tables Surveys1
The surveys themselves create their own tables and I have code in them that cheks for multiple member entries in the survey tables so I'm fine there. No one will be able to add the form results more than once.
So what I need is a method to show members the right surveys when they log in and click on the survey page. I'm thinking the best way would be to check the database for active surveys for lists they are members of. The pages already gets their list ID number so its already available as a variable. I could run that against the surveys table and see if there is an active survey and even get the survey file name and location but how would I write that?
How would I direct them to the file name? Would i create a variable out of the survey names or file names of file paths or something? Can a variable be passed in a link?
What should I put in the surveys table to accomplish this?
Thanks for all the help..
I've set up a survey table where I can add the names of the surveys and file names and even paths and the list Id numbers they are associated with I call that tables Surveys1
The surveys themselves create their own tables and I have code in them that cheks for multiple member entries in the survey tables so I'm fine there. No one will be able to add the form results more than once.
So what I need is a method to show members the right surveys when they log in and click on the survey page. I'm thinking the best way would be to check the database for active surveys for lists they are members of. The pages already gets their list ID number so its already available as a variable. I could run that against the surveys table and see if there is an active survey and even get the survey file name and location but how would I write that?
How would I direct them to the file name? Would i create a variable out of the survey names or file names of file paths or something? Can a variable be passed in a link?
What should I put in the surveys table to accomplish this?
Thanks for all the help..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When a user clicks on the survey link, you then bring up the survey for the list with the list_id in the member_lists table, by bringing up active survey for the selected list_id
I dont know if this makes sense to you, but it does to me :-)