Dynamic form element not being recognized in $_post

InsideSin

New Member
I have a function that dynamically generates a form. Everything worked perfectly until I needed to add in an additional field to grab the unix timestamp that is to be passed in.The new hiddden field is identical to the previous one, except for the name of course, but \[code\]task_date\[/code\] is NEVER included in the posted values.Here is the function\[code\] private function addTaskForm($court_id, $judge_id, $employee_id, $date) { // display add task form // if judge_id == null then display judge selection box // if employee_id == null then display employee selection box $form = "<form method='post' action='#'>"; $form .= "<input type='hidden' name='court_id' value='http://stackoverflow.com/questions/15713399/$court_id'>"; $form .= "<input type='hidden' name='task_date' value='http://stackoverflow.com/questions/15713399/$date'>"; <= this is the NEW element if($judge_id == null) $form .= Utils::selectJudge($this->db)."<br />"; else $form .="<input type='hidden' name='judge_id' value='http://stackoverflow.com/questions/15713399/$judge_id'>"; if($employee_id == null) $form .= Utils::selectEmployee($this->db)."<br />"; else $form .="<input type='hidden' name='employee_id' value='http://stackoverflow.com/questions/15713399/$employee_id'>"; $form .=Utils::selectTask($this->db)."<br /><br /> <select name='start_time'><option>Start</option>".Utils::selectTime()." </select> - <select name='end_time'><option>End</option>".Utils::selectTime()." </select> <input type='submit' name='btnAddTask' value='http://stackoverflow.com/questions/15713399/Add Task'></form>"; return $form;\[/code\]}Here is the output after cycling through the posted values:\[code\]key: court_id: 3key: judge_id: 1key: employee_id: 217key: task_id: 1key: start_time: 0800key: end_time: Uknownkey: btnAddTask: Add Task\[/code\]
 
Back
Top