Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
help
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2022-03-30 11:42:53
what is wrong here? when i select it doesnt take what i select

$rangclass1 = "<option value=0>---User prestige---</option>\n";
$res28 = SQL_Query_exec("SELECT id,name FROM rangclass ORDER BY name");
while ($rank = mysqli_fetch_array($res28))
$rangclass1 .= "<option value=".$rank["id"]."" .htmlspecialchars($user["rangclass"] == $rank["id"] ? " selected" : "") . ">".$rank["name"]."</option>\n";
if ($CURUSER["class"] < 8)
print("<input type='hidden' name='rangclass' value='".$user["rangclass"]."'>\n");
else
{
print("<tr><td class=rowhead><font color=#AFFF00>User prestige</font></td><td colspan=2 align=left><select name=rangclass>\n$rangclass1\n</select></tr>\n");
}
2022-03-30 16:02:36
Well, I'm not a coder, but even I can see the misplaced period (.) before the equals sign (=) on line 4

$rangclass1 .= "<option value=".$rank["id"]."" .htmlspecialchars($user["rangclass"] == $rank["id"] ? " selected" : "") . ">".$rank["name"]."</option>\n";

should be...
$rangclass1 = "<option value=".$rank["id"]."" .htmlspecialchars($user["rangclass"] == $rank["id"] ? " selected" : "") . ">".$rank["name"]."</option>\n";

NOTE: I don't know if anything else is wrong...as I said, I'm not a coder.
Last edited by Obiwan on 2022-03-30 16:15:43
2022-03-30 16:34:30
i have noticed that period the thing is if i delete it i dont have the option to chose
THX for help aniway
2022-03-30 17:27:58
No problem. And who knows, I might even be wrong with my assumption about that change anyway. lol
Good luck.
2022-03-31 13:00:58
I think some braces were missing, but im not sure beyond that, maybe this?

$rangclass1 = "<option value=0>---User prestige---</option>\n";
$res28 = SQL_Query_exec("SELECT id,name FROM rangclass ORDER BY name");
while ($rank = mysqli_fetch_array($res28)) {
$rangclass1 .= "<option value=".$rank["id"]."" .htmlspecialchars($user["rangclass"] == $rank["id"] ? " selected" : "") . ">".$rank["name"]."</option>\n";
if ($CURUSER["class"] < 8)
print("<input type='hidden' name='rangclass' value='".$user["rangclass"]."'>\n");
else
{
print("<tr><td class=rowhead><font color=#AFFF00>User prestige</font></td><td colspan=2 align=left><select name=rangclass>\n$rangclass1\n</select></tr>\n");
}}
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2022-03-31 17:08:22
ok it is all good i just had to put this in admin-modtask


if ((isset($_POST['rangclass'])) && (($rangclass = $_POST['rangclass']) != ($currangclass = $CURUSER['rangclass'])))
{
//$modcomment = gmdate("d-m-Y \à H:i") . " - Prestige changed to '".$rangclass."' from '".$currangclass."' by " . $CURUSER['username'] . ".\n" . $modcomment;

$updateset[] = "rangclass = " . sqlesc($rangclass);
}



Thanx for help
Last edited by djlive on 2022-03-31 18:58:20
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728