12-23-2016, 11:10 PM
Ahh. I see what's going on. You're not able to use our lastid function because you're not using our db class. It's really not that hard. I see several things...
the header redirect could cause problems and give you "headers already sent" errors. That's why we have the
It tries a javascript redirect first and then only relies on the headers if it needs to.
Second, by getting the info from, you are missing out on the data sanitization that happens when you use
This is your insert query reformatted with the id returned to you as
http://pastebin.com/W9Uag7Gj
Note...that if you don't need all those variables, it could be as simple as this...
http://pastebin.com/ZShrgaeJ
That last version cuts out 15 lines of code and does the same thing.
Let me know if something doesn't make sense.
the header redirect could cause problems and give you "headers already sent" errors. That's why we have the
Code:
Redirect::to('account.php');
Second, by getting the info from
Code:
$_POST
Code:
Input::get
This is your insert query reformatted with the id returned to you as
Code:
$newTaskId
http://pastebin.com/W9Uag7Gj
Note...that if you don't need all those variables, it could be as simple as this...
http://pastebin.com/ZShrgaeJ
That last version cuts out 15 lines of code and does the same thing.
Let me know if something doesn't make sense.