Jump to content
MakeWebGames

Djkanna

Members
  • Posts

    3,137
  • Joined

  • Last visited

  • Days Won

    35

Everything posted by Djkanna

  1. I prefer that to however in this case it really wouldn't work unless you had the success message ingame otherwise you'd need the meta tag.
  2. Looks good enough to eat.
  3. Djkanna

    WTF

    "Ophiuchus: Nov. 29- Dec. 17" Doesn't exist, it was removed two millennia ago to make it a even 12. I wouldn't switch your horoscopes just yet.
  4. Add a meta tag if need be to automatically send the user to index.php upon signup completion.
  5. Hell why not; $20
  6. Thought about not double escaping? I'll elaborate. magic_quotes is more than likely turned on for you, which appends the function addslashes() to _POST, _GET, _COOKIE, then when it comes time for you to escape it yourself, note: ($db->escape() within the query), while doing what you should be doing you're actually double escaping said variable, which isn't a good thing. mysql_real_escape_string() nor addslashes() will actually store the backslash in the database however if you double escape you will end up with one in your database. Solutions: Turn off Magic_quotes. If it's not possible for your to turn off Magic_quotes (will be removed in PHP6) then stripslashes() before escaping in your queries. Maybe create a function for this, or perhaps look into array_walk(), count() those can help when dealing with this problem. if (get_magic_quotes_gpc()) { function callback_stripslashes(&$val, $name) { if (get_magic_quotes_gpc()) $val=stripslashes($val); } if (count($_GET)) array_walk ($_GET, 'callback_stripslashes'); if (count($_POST)) array_walk ($_POST, 'callback_stripslashes'); if (count($_COOKIE)) array_walk ($_COOKIE, 'callback_stripslashes'); } **Found in Pastebin source. $db->query('UPDATE `table` SET `string` = "'.stripslashes($db->escape($var)).'" ');
  7. Kidding is fine but there is no need to send in a false report...
  8. Djkanna

    jQuery helps ;[

    Source: <!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>MrDJK</title> <meta name="description" content="I really just advertise my sites here and other sites but hey visit this page anyway, it has things about web developing occasionally and games too! (:"> <meta name="author" content="MrDJK"> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> <link rel="shortcut icon" href="/favicon.ico"> <link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="stylesheet" href="css/style.css?v=1"> <link rel="stylesheet" media="handheld" href="css/handheld.css?v=1"> <script src="js/modernizr-1.5.min.js"></script> </head> <body> <div id="container"> <p class="saving"></p> <form action="test.php" id="theForm"> <input type="submit" id="formButton" value="Save" /> </form> </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script>!window.jQuery && document.write('<script src="js/jquery-1.4.2.min.js"><\/script>')</script> <script type="text/javascript"> $(document).ready(function(){ $('#formButton').click(function() { $.ajax({ url: 'test.php', success: function(ret) { $('#theForm').remove(); $('#container').append(ret); } }); return false; }); }); </script> </body> </html> <?php session_start(); if (isset ($_SESSION['counts']) ) { ++$_SESSION['counts']; } else { $_SESSION['counts'] = 1; } $times = ($_SESSION['counts'] > 1) ? ' '. number_format ($_SESSION['counts']) .' times' : '1 time'; echo ' <div id="container"> <form action="test.php" id="theForm"> <p class="saving">This has been saved a total of '.$times.'</p> <input type="submit" id="formButton" value="Save again" /> </form> </div> '; ?> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script>!window.jQuery && document.write('<script src="js/jquery-1.4.2.min.js"><\/script>')</script> <script type="text/javascript"> $(document).ready(function(){ $('#formButton').click(function() { $.ajax({ url: 'test.php', success: function(ret) { $('#theForm').remove(); $('#container').append(ret); } }); return false; }); }); </script> Now if you goto http://mrdjk.com/playground/sim/djk It's pretty much the exact same thing but done without an ajax request nor jQuery (forgive the poor standards coding I did it quick); And that source is <!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>MrDJK</title> <meta name="description" content="I really just advertise my sites here and other sites but hey visit this page anyway, it has things about web developing occasionally and games too! (:"> <meta name="author" content="MrDJK"> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> <link rel="shortcut icon" href="/favicon.ico"> <link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="stylesheet" href="css/style.css?v=1"> <link rel="stylesheet" media="handheld" href="css/handheld.css?v=1"> <script src="js/modernizr-1.5.min.js"></script> </head> <body> <div id="container"> <span id="times" style="display:none;">0</span> <p id="saved"></p> <form action="" id="theForm"> <input type="submit" id="formButton" value="Save" onClick="theClicks(); return false"/> </form> </div> <script type="text/javascript"> function theClicks() { var stored = document.getElementById('times'), times = stored.innerHTML; times++; document.getElementById('saved').innerHTML = 'This has been saved ' + times + ' times'; stored.innerHTML = times; } </script> </body> </html>
  9. Djkanna

    jQuery helps ;[

    It does the exact same as what yours does. it replaces what it's supposed to replace only difference is I've anticipated this and added Javascript in the test.php (what you'd call ajax.php)
  10. Djkanna

    jQuery helps ;[

    I like to help so is this the desired effect you're looking for? http://mrdjk.com/playground/sim/
  11. Key support would be a good addition and may it a bit more appealing to this audience.
  12. Currently playing Kings Age with MD but I'll take a look at LoL <- (see what I did there?) :P
  13. Djkanna

    deleted

    Why so many topics regarding the same query?
  14. It would be a miracle. What if Lilith turned us all into Equal Opportunity Bitches (look at here Avatar ;) )?
  15. In all honesty you can learn this from a good book or even online depending on how you are with sites like php.net... [...] Problem solved.
  16. We'd all have happy feet, I got those happy feet so on and so forth. I'm not going to give you a 'what if' because I cannot be arsed.
  17. I know people that are learning PHP by playing with MCCodes at the moment, I'm not sure why maybe they want to make something out of MCCodes but that's their choice, I personally am not going to stop them as their learning, hell I may even help them along the way. Now I'm more on edge to agree with Paul on this, MCCodes hasn't provided us with some 'great web devs' their willingness to learn has provided them with the knowledge they've gained. It seems strange, at one point we were all basking in the glory of MCCodes because we could make decent modifications for it and fix it's bugs, yet now we're against it perhaps it's time for us to step down and let the new ones to the community take our place after all those previously mentioned people did. MWG is MCC focused no matter how many new boards you supply it's still going to be centred on MCC that ain't going to change. These are just general replies to posts in this topic in no order whatsoever.
  18. Why?
  19. http://phpsec.org/projects/guide/
  20. Don't need PHPMyAdmin to modify the database, am I being annoying now?
  21. The above snippet is merely there for IE to recognize your custom tag, I share the same opinion as Alain I don't see the goal of using your own tags but yeah. Maybe take a look at the code behind html5shiv, as that serves the same goal except for getting HTML5 elements to work correctly in IE.
  22. I've used Blender for quite sometime, not so much to build models that are useful though just me playing around. I tried Daz3D and um got myself confused so I closed it and haven't opened it since.
  23. You don't need access to CPanel to 'secure' someones site...
  24. IE 6/7/8 will not recognize it without using a little Javascript. [js]document.createElement('yourTag');[/js]
  25. As a developer I would use it, separated makes sense especially if you'd be creating a network of games that use the same credits throughout. As a gamer I probably would share the same opinion as Cronus, however if it were like I described as above and I played all the games within the network I would like it better to be cross-game credits then purchasing for specific games.
×
×
  • Create New...