PDA

View Full Version : Question about bbuserinfo array


Velocd
08-07-2002, 01:12 AM
You know how in vB you can place $bbuserinfo[username] anywhere and it will output your username from the table user? Well, how can I apply this same effect for a new table? Say I create a table much like user, that I am going to store much of the same data user has in it. Call it newusertable. And I would like to use a new array called $bbuserinfonew with as many elements equal to the amount of columns I have in newusertable. Then after giving the array values, probably done in a while or for loop, I can use $bbuserinfonew[username], say, and it would output that user viewing data, from the new table.

How could this exactly be created? :rolleyes: I haven't had too much use with this kind of coding in PHP yet. :ermm:

If you understand what I'm asking and could help, it would be great! Even directing me to a place in the vB files that I can find a source to look at would be helpful. ;)

Neo
08-07-2002, 02:11 AM
*kicks him* :p

Well I can give you a push along in the right direction I hope.

Now start by opening admin/sessions.php, now somewhere around line 50 or so you should see where $bbuserinfo gets declaired.


if ($bbuserinfo=$DB_site->query_first("SELECT user.*,userfield.* FROM user LEFT JOIN userfield ON userfield.userid=user.userid WHERE user.username='".addslashes(htmlspecialchars($loginusername))."'")) {


around this is logging and password information.

so from that you should be able to make your own query like $bbuserinfo.


- Neo ;)

Velocd
08-07-2002, 03:17 AM
Yes, that is what I've been looking for ;)
Thanks abunch.

*limps away* :P

Neo
08-07-2002, 04:15 AM
No problem man :)

Admin
08-07-2002, 10:56 AM
Velocd: Please remove the text or image from your signature, you are not allowed to have both.

Velocd
08-07-2002, 06:53 PM
Done
Sorry about that, I completely forgot. ;)