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
Option to Insert record in admin_user.php
#1
I want to insert a record in a table on the admin_user.php page.
The option is located in the Misc Settings modal dialog box right beside the Delete user option.
(Between Lines 610 - 650)


The code is as follows:


 <label>Clone this User?
      <input type='checkbox' name='clone[<?php echo "$userId"; ?>]' id='clone[<? echo "$userId"; ?>]' value='<?php echo "$userId"; ?>' <?php if (!checkMenu(2,$user->data()->id) || $userId == 1){  ?>disabled<?php } ?>></label>
      </div>



(Between lines 50 - 60) under the "Form posted" section, right beneath the deletion Post, the code is as follows:

 if(!empty($_POST['clone'])){

    $db->insert("members", ["memberid"=>$userId]);

    }

When I click the update button, nothing is going to the database. I use the dnd($variable); and i see the value of the userId but I have no idea why that record is not inserted.

Need some help urgently!!!!!!!!!!!
  Reply


Messages In This Thread
Option to Insert record in admin_user.php - by eforbes - 10-11-2018, 09:26 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)