The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insert multiple from input checkbox
#15
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
Code:
Redirect::to('account.php');
It tries a javascript redirect first and then only relies on the headers if it needs to.

Second, by getting the info from
Code:
$_POST
, you are missing out on the data sanitization that happens when you use
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.

  Reply


Messages In This Thread
Insert multiple from input checkbox - by picassoo - 12-20-2016, 07:57 PM
Insert multiple from input checkbox - by picassoo - 12-20-2016, 08:15 PM
Insert multiple from input checkbox - by mudmin - 12-21-2016, 03:00 PM
Insert multiple from input checkbox - by picassoo - 12-21-2016, 06:06 PM
Insert multiple from input checkbox - by picassoo - 12-21-2016, 06:16 PM
Insert multiple from input checkbox - by picassoo - 12-21-2016, 06:44 PM
Insert multiple from input checkbox - by mudmin - 12-21-2016, 08:26 PM
Insert multiple from input checkbox - by picassoo - 12-21-2016, 10:09 PM
Insert multiple from input checkbox - by mudmin - 12-22-2016, 02:03 PM
Insert multiple from input checkbox - by picassoo - 12-22-2016, 08:49 PM
Insert multiple from input checkbox - by mudmin - 12-22-2016, 10:20 PM
Insert multiple from input checkbox - by picassoo - 12-23-2016, 09:47 AM
Insert multiple from input checkbox - by mudmin - 12-23-2016, 01:47 PM
Insert multiple from input checkbox - by picassoo - 12-23-2016, 10:52 PM
Insert multiple from input checkbox - by mudmin - 12-23-2016, 11:10 PM
Insert multiple from input checkbox - by mudmin - 12-23-2016, 11:12 PM
Insert multiple from input checkbox - by picassoo - 12-24-2016, 11:46 AM
Insert multiple from input checkbox - by picassoo - 12-24-2016, 11:48 AM
Insert multiple from input checkbox - by mudmin - 12-24-2016, 04:05 PM
Insert multiple from input checkbox - by picassoo - 12-24-2016, 08:25 PM
Insert multiple from input checkbox - by picassoo - 12-24-2016, 09:16 PM
Insert multiple from input checkbox - by mudmin - 12-25-2016, 07:35 PM
Insert multiple from input checkbox - by mudmin - 12-25-2016, 08:35 PM
Insert multiple from input checkbox - by picassoo - 12-26-2016, 06:54 PM
Insert multiple from input checkbox - by dan - 12-26-2016, 07:16 PM
Insert multiple from input checkbox - by picassoo - 12-26-2016, 08:07 PM
Insert multiple from input checkbox - by dan - 12-26-2016, 09:55 PM
Insert multiple from input checkbox - by picassoo - 12-27-2016, 05:52 AM
Insert multiple from input checkbox - by dan - 12-27-2016, 06:07 AM
Insert multiple from input checkbox - by picassoo - 02-10-2017, 09:53 PM
Insert multiple from input checkbox - by mudmin - 02-11-2017, 02:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)