![]() |
How to call a Profile field in a php file?
I'm trying to create a webcam script, and would like to use a hidden profile field where the member can enter his/her address to the webcam and it will automatically add to the page.
How could one accomplish this smartly, and what would be the query to select from a certain field? i know how to call from a field in a template, but don't know how to accomplish this in a php file. thanks. |
Just run a query... Off the top of my head:
PHP Code:
I'm not sure what mroe you want, but this should do the main part. |
Quote:
So i would drop the WHERE userid=X and it would scan for all? Ohh, and thanks. :) |
Pretty much, yes.
You actually need to run a while. Try this: PHP Code:
PHP Code:
Edit: by the way, if your php file isn't associated with vBulletin (doesn't include global.php) you have to use mysql_query instead of $DB_site->query and mysql_fetch_array instead of DB_site->fetch_array. Also, if this is the case, you can't use templates, obviously. :) |
Quote:
Yerah it's going to include global.php. so it will work, but thanks for the info. :) |
If the user is logged in, just use $bbuserinfo['fieldn'] in your PHP, just as you woul d in a template.
|
All times are GMT. The time now is 09:13 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|