Hello All, I'm working on a survey system for my company and I have it setup in the system so that there are two ways to take the survey.
1) New Survey Taker no prior information
2)Survey was already sent out and a session was created.
In case one I would like my URL to look like:
mydomain.com/SurveySystem/index.php/survey/$surveyID
($surveyID being a integer of the survey to take)
The second case would where we create a link with for the test taker. I would like the URL to look like this:
mydomain.com/SurveySystem/index.php/survey/$surveySessionID/$guestID
In my Survey class I have it setup as the following:
function index(){
$segments = $this->uri->total_segments();
if($segments == 1){
echo "no surveyID set";
return;
}
if($segments == 2){
$this->take_survey($this->uri->segment(2));
}
if($segments == 3){
$this->survey_session($this->uri->segment(3), $this->uri->segment(4));
}
}
When no information is passed the it echos just fine. But if I try to put a integer where the surveyID is it thinks i'm loading up a method in the controller.
Thank you for the help!