[eluser]pdxbenjamin[/eluser]
So i'm pretty sure this is basic stuff...
I have a standard form that works, that has two text input boxes and a submit button, right.
I use ajax to make more fields when a user clicks on a + button. That also works.
This is the input box a user can make as many they wish...
<input type="text" name="calendarStartDate[]" id="start_date" class="textInput" />
I'm making a calendar and these are the text inputs so to add dates.
well, here is where i get stuck and would appreciate some assistance.
How do I get the controller and model to accept the array of dates and put them into a database.
After validation I have this in the controller.
$calendar_id = $_POST['calendar_id'];
$startDates = $_POST['calendarStartDate'];
$cInfo['calendar_id'] = $calendar_id;
$cInfo['start_date'] = $startDates;
The model..
function insert_calendar_date($cInfo)
{
$this->db->insert('calendar_info', $cInfo);
}