11-30-2016, 01:58 AM
Ok. So help me figure out where you are stuck. Obviously without your database, I can't see everything, but I can tell you how I would start to solve it.
1. Double check that all your database columns have the right format. If one field is formatted improperly, the insert will fail.
The thing that sticks out to me is that you are dealing with dates. So, if your database is listed as datetime, look at how it is formatted. Is it something like this 2016-09-30 10:00:00 in the database if you add it manually? After you look at it, add
dnd($post_time);
right after the line...
$post_time = Input::get('post_time');
to make sure the time you're posting is in the right format. Otherwise, you need to do some date and time conversions.
2. I see you are doing multiple inserts. Are any of them working? Which one are you getting stuck on?
3. Also, feel free to comment out all your validation. I almost never add the form validation until I'm sure that the entire query works.
4. I use dnd() and die() a lot to figure out how far I made it through the process. So after an insert, I'll do die("Made it to step 3"); to figure out where things went wrong.
1. Double check that all your database columns have the right format. If one field is formatted improperly, the insert will fail.
The thing that sticks out to me is that you are dealing with dates. So, if your database is listed as datetime, look at how it is formatted. Is it something like this 2016-09-30 10:00:00 in the database if you add it manually? After you look at it, add
dnd($post_time);
right after the line...
$post_time = Input::get('post_time');
to make sure the time you're posting is in the right format. Otherwise, you need to do some date and time conversions.
2. I see you are doing multiple inserts. Are any of them working? Which one are you getting stuck on?
3. Also, feel free to comment out all your validation. I almost never add the form validation until I'm sure that the entire query works.
4. I use dnd() and die() a lot to figure out how far I made it through the process. So after an insert, I'll do die("Made it to step 3"); to figure out where things went wrong.