2019-08-27, 10:46 PM
(This post was last modified: 2019-08-28, 10:48 PM by GodLess101. Edited 1 time in total.)
Hello, so here I am again with yet another problem, I might be really tired or I just can't figure it out.
I'm outputting a page through a template, just like normal, but before I do that I declare some variables.
$pe_name = "name";
inside the template I have
{$pe_name}
but nothing shows up.
here's some code for y'all.
then it reaches switch statement right after which is working, it outputs the right template, but the template aren't catching onto those variable.
I still haven't reached a feasible solution yet, any solution would be lovely.
I tried making an arary at start of file like
$pe_user = array("username" => "name");
That works well, I can call that, but if I try to change that array nothing happens.
No help ?
I'm outputting a page through a template, just like normal, but before I do that I declare some variables.
$pe_name = "name";
inside the template I have
{$pe_name}
but nothing shows up.
here's some code for y'all.
$pe_name = "";
$pe_avatar = "";
$pe_image = "";
$pe_title = "";
$selected_uid = $mybb->get_input('ushowid');
$query = $db->simple_select("users", "*", "uid='".$selected_uid."'", array(
"order_by" => 'uid',
"order_dir" => 'DESC',
"limit" => 1
));
$foundUser = $db->fetch_array($query);
if ($foundUser['uid'] > 0) {
$pe_name = $foundUser['username'];
$pe_avatar = $foundUser['avatar'];
if ($pe_avatar == "") {
$pe_avatar = "/images/default_avatar.png";
}
$pe_title = "My Portfolio!";
$pe_image = "https://www.paintoolkit.org/assets/img/backgrounds/background-banner-tools.jpg";
$page2show = "show_user";
} else {
$page2show = "show_list";
}
then it reaches switch statement right after which is working, it outputs the right template, but the template aren't catching onto those variable.
I still haven't reached a feasible solution yet, any solution would be lovely.
I tried making an arary at start of file like
$pe_user = array("username" => "name");
That works well, I can call that, but if I try to change that array nothing happens.
No help ?