The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (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
Find id by username
#1
Hi,
I am new to userspice and my experience with PHP is two months, so forgive me if I am a bit slow. I have added a new column to the users table. I want to add a random number to this column for each user after register, trying to do that in join.php.
Here is what I have done so far

this is to get the id
<pre>
Code:
$user_name=Input::get('username');
$user_n = $db->get('users',['username','=',$user_name]);
</pre>


then insert it
Code:
$db->update('deposit_id',$the_id,$fields);

nothing is happening, what am I doing wrong?
Any help would be appreciated trying to recommend this app for a project.
Thanks in advance.
  Reply


Messages In This Thread
Find id by username - by CromeX - 10-21-2016, 02:01 PM
Find id by username - by mudmin - 10-21-2016, 02:54 PM
Find id by username - by mudmin - 10-21-2016, 02:56 PM
Find id by username - by CromeX - 10-21-2016, 03:14 PM
Find id by username - by mudmin - 10-21-2016, 04:07 PM
Find id by username - by CromeX - 10-21-2016, 05:41 PM
Find id by username - by mudmin - 10-21-2016, 05:42 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)