PDA

View Full Version : Querying User Profile Fields


TruthElixirX
06-26-2006, 10:34 PM
I need to pull information in a user profile field to a PHP script. This PHP script is going to be a dynamic image.


Header ("Content-type: image/png");
$img_handle = imageCreateFromPNG(profile field X);
$color = ImageColorAllocate ($img_handle, 100, 100, 100);
$ip = $_SERVER['REMOTE_ADDR'];
ImageString ($img_handle, 3, 10, 9, "profile field X, profile field X);
ImagePng ($img_handle);
ImageDestroy ($img_handle);


Something like that would be the code I was using for the dynamic image thing. (I lifted that off of a tutorial, not how mine will work exactly).

Do you understand what I'm saying? I just need to learn how to use the profile fields in a non-native PHP document. >.<. Any help is much appreciated!

Marco van Herwaarden
06-28-2006, 07:20 AM
I am not really sure i understand what information you are asking for.

Paul M
06-28-2006, 07:51 AM
Unless you are including global.php in your script you will need to pull the sessionid from the users cookie, and then run an sql query to get the userid and userprofile field(s) you want.

TruthElixirX
06-28-2006, 05:07 PM
@Marco, I'm still learning programming. I'm asking what array or variable contains user profile fields. I want to use the information contained in a user profile field in another php script.

@Paul M, I plan on including global.php and such.

Paul M
06-28-2006, 05:43 PM
If you include global.php the the information is available to you as $vbulletin->userinfo['fieldx'];

TruthElixirX
06-28-2006, 07:03 PM
If you include global.php the the information is available to you as $vbulletin->userinfo['fieldx'];
Thanks! :D.