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
creating a user dossier
#5
Ok. Sure. So let's walk through that.

Let's say you have a page called dossier.php and you are calling that page as dossier.php?id=3 (the user's id).

Your code would look like this...
https://pastebin.com/yUut6CbR

So what I did there is grabbed the id from the URL and did a query of the users table where the user id was that number. If you have your data stored in a different table, just change the table in the infoQ query.

Then I made a table to show all the data. If you only want to echo out certain data, you don't need the foreach loop. You can just do echo $info->columname;

Hope that helps.
  Reply


Messages In This Thread
creating a user dossier - by LBC - 03-22-2019, 02:56 PM
RE: creating a user dossier - by LBC - 03-24-2019, 03:24 PM
RE: creating a user dossier - by mudmin - 03-24-2019, 04:56 PM
RE: creating a user dossier - by LBC - 03-24-2019, 05:20 PM
RE: creating a user dossier - by mudmin - 03-24-2019, 06:25 PM
RE: creating a user dossier - by LBC - 03-25-2019, 09:03 AM
RE: creating a user dossier - by mudmin - 03-25-2019, 12:09 PM
RE: creating a user dossier - by LBC - 03-25-2019, 01:04 PM
RE: creating a user dossier - by LBC - 03-26-2019, 08:35 AM
RE: creating a user dossier - by LBC - 03-28-2019, 06:16 AM
RE: creating a user dossier - by Brandin - 03-29-2019, 06:47 PM
RE: creating a user dossier - by LBC - 03-30-2019, 06:20 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)