2022-12-18, 05:00 PM
Hi,
On my member_profile page, I have a link that links off to my plugin URL. I'm trying to pass the $memprofile['uid'] through the URL, and read information from the SQL database based on that user's UID. I want to be able to click the button, redirect to my plugin's page, and see information about the user. How can I achieve this in my plugin?
On member_profile, I have
In my example.php I have
Here are the hooks that I'm using
The issue I'm having is that in the SQL query, it's not reading the {$memprofile['uid']}. It tries to query as
Any help is appreciated
On my member_profile page, I have a link that links off to my plugin URL. I'm trying to pass the $memprofile['uid'] through the URL, and read information from the SQL database based on that user's UID. I want to be able to click the button, redirect to my plugin's page, and see information about the user. How can I achieve this in my plugin?
On member_profile, I have
<a href="/misc.php?action=example&uid=1">Example Text</a>
In my example.php I have
function example()
{
global $mybb, $db, $templates, $lang, $header, $headerinclude, $memprofile, $footer;
add_breadcrumb('Example', "misc.php?action=example");
$db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE uid = '{$memprofile['uid']}'");
if($mybb->get_input('action') == 'example' && $mybb->get_input['action'] == $uid)
{
eval("\$page = \"".$templates->get("example")."\";");
output_page($page);
}
}
Here are the hooks that I'm using
$plugins->add_hook('misc_start', 'example');
$plugins->add_hook('member_profile_end', 'example');
The issue I'm having is that in the SQL query, it's not reading the {$memprofile['uid']}. It tries to query as
SELECT * FROM users WHERE uid = '''
Any help is appreciated