Jump to content
MakeWebGames

Recommended Posts

Posted

hi, i remembered from while ago that a player on my game wanted some attack logs made for them so they know who attacked them.

well i made it and now i feel like sharing it lol.

its a quite simple mod but still here...

i called this file "ayw.php" (attacks you won)

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

i called this file "ayl.php" (attacks you lost)

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

in explore just add these links anywhere you want...

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

hope you like it :P

Posted

You just did what I just did lol.....................

 

I dont htmlentities the name as most use the typical <font color> and the htmlentities will strip that.

 

Also prefer $db as it has it's own error handler :P

Posted

GLOBAL is very insecure, so I don't use it.

No need to use the class when you can just add : or die(mysql_error()); on the end of the 2 queries.

Add the username inside of the <font> tags and it won't matter, that's if it's in the header.

And <font> has been deprecated

:D

Posted

I know <font> is depricated but 80% of the users on the forums still use it, gotta cater to them ^_^

 

And for 2 queries adding the mysql bit is fine, but if i'm making a script that is 800+ lines i'm not going to do that for each one when i can just use $db :P

Posted

So on that script, add a function at the top that works for mysql_query() just like the class.

And it still doesn't change the fact that GLOBAL is insecure - also, Unless their username was '<font color = red>Equinox</font>' it shouldn't matter.

You could just go to header and have:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted
GLOBAL is very insecure, so I don't use it.
Care to enlighten us on how the Global is insecure?
GLOBAL is very insecure, so I don't use it.
Care to enlighten us on how the Global is insecure?

My bad - I was thinking of the superglobal

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

:pinch:

Posted

still in 2 files but i updated it little...

this is "ayl.php";

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

this is "ayw.php";

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

unless you already had the joined together one... replace the information with this...

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

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...