Jump to content
MakeWebGames

Recommended Posts

Posted

hello, I got this problem.

i've added in a little mod i made which shows the user id last win and last lost.

It displays the users ID but idealy i want it to show the players username instead,

how do i go about doing this,

Here is what i have to this might help put me in the right direction.

Last Win: ID <a href='viewuser.php?u={$r['lastwin']}'><font color='green'>{$r['lastwin']}</font><br /></a>

Last Lost: ID <a href='viewuser.php?u={$r['lastlost']}'><font color='red'>{$r['lastlost']}</font><br /></a>

Posted

i've updated this abit

 

$win= "{$r['lastwin']}";

$lost= "{$r['lastlost']}";

 

Last Win: ID <a href='viewuser.php?u={$r['lastwin']}'><font color='green'><b>$win</b></font><br /></a>

Last Lost: ID <a href='viewuser.php?u={$r['lastlost']}'><font color='red'><b>$lost</b></font><br /></a>

so anyhelp on displaying username?

Posted

idea, this workd but now doing this affects the links,

What shall i do about that.

When placing mouse over the username it shows up the correct userid in the viewuser link but when you click this error comes up

QUERY ERROR: Unknown column 'N' in 'where clause'

Query was SELECT `username` FROM `users` WHERE (`userid` = N/A);

how would i go about solving this new problem.

Posted

well in the attack php, a sql update is sent to the users, lastwon and last lost

in profile it displays like this

Last Win: {$r['lastwon']} <br />

Last Lost: {$r['lastlost']} <br />

What is inserted into the database is the id of the user. which is working good.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...