Jump to content
MakeWebGames

bluegman991

Members
  • Posts

    394
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by bluegman991

  1. this is the solution to all browser to center a table   <table style="margin-left:auto; margin-right:auto;"></table>
  2. if u have a mysql class u could either filter any query's that have delete in them and add what they've delete along with the page where it was executed from to another table. then just look for the magic query and... u got the page that was doing it.
  3. what kind of fromat? formating strings to numbers / numbers to strings / strings to strings / numbers to numbers int , float , currency , name , etc...?
  4. RewriteRule ^page\/([0-9]{0,5})\/$ /page\.php?q1=$1&%{QUERY_STRING}   thanx for the help guys and gals :thumbsup:
  5. ok i got it working will post a working version in a sec :thumbup:
  6. ok ive been reading around and have found out you cant escape ? in htaccess with \? you have to do something with %{QUERY_STRING} still looking to see how to make this work :thumbup:
  7. im echoing $_GET['q2'] to make sure its working write and haunted dawg i tried what you said and........... when i have nothing after the 2nd slash it echo's .php if something does come after the 2nd / it echo's that unless there's a question mark in it. then it either ignores anything after the question mark or if the question mark is at the begining it echo's .php
  8. the question mark will be for query's the real url will be... "http://www.website.com/page/(int)/?query=foo&query2=bar" => "http://www.website.com/page.php?number=(int)&query=foo&query2=bar" or "http://www.website.com/page/(int)/" => "http://www.website.com/page.php?number=(int)"
  9. ok in my htaccess file this is the line i am having problem with   RewriteRule ^page\/(\d{0,5})\/?\-?(.*)?$ /page\.php?q1=$1&q2=$2   so as u can see by looking at it the url the page accessor will see is "http://www.website.com/page/(int)/" and the url the server see's is "http://www.website.com/page.php?q1=(int)" first of all everything works fine as is ...unless i enter a question mark somewhere in the url after the (int) then nothing after the question mark is captured my problem is at the highlighted & underlined part of the line "RewriteRule ^page\/(\d{0,5})\/?\-?(.*)?$ /page\.php?q1=$1&q2=$2" i want to change it to \? but when i do that nothing after that point is captured any other charcter works just fine just not the question mark is there something at that point i am doing wrong? is there something in apache that may be configured wrong? can apache just not handle "?" in the input url? (will i have to just find some other character to use?)
  10. crime game i have something similar to what u suggested about hashing the users username but i dont know whether i should look at it as a good thing or a bad thing... or a better way to do it you see i have it so when they log in it sets there session sec id to there id+some random numbers+a little more info that wont change throught there session. and while testing i see that they can only be logged in on 1 browser at a time. but if the log into their account on another browser/computer it will log them out on the other browser and start a new session in the 1 they just logged into. so im wondering if there account was to get hacked while they were either away from their computer for a short amount of time or while they were playing would it be good to let them be hack while there logged out, or find some way to keep them logged in so they can see everything
  11. Line 20: $_POST['subm']=str_replace('\\\'',''', $_POST['subm']);   should be $_POST['subm']=str_replace('\\\'','\'', $_POST['subm']);   thats the first thing i saw from looking but what error exactly r u getting?
  12. yea when i first started coding i tried this function this is something that you should not put on your website. All it really does is screw up the data in your $_GET and $_POST when u have certain characters in there. And its not very well thought out. It could be useful in some cases but in all cases it is not useful. Something better to use instead of this would be a simple preg_replace() or an htmlspcialchars() but like i said 1 thing cant solve everything so it will not be useful in all cases. also sprintf :thumbdown: its confusing and there are things that can be used in place of it. and the $IP variable mysql escape should be enough the only reason you would need anything else like htmlspecialchars is when u r printing it in the case there might be html/java in it But apart from that good job on the explanation.
  13. $randstextnum=rand(1,3); if($randstextnum==1) { $crstext=$r['crimeSTEXT']; } elseif($randstextnum==2) { $crstext=$r['crimeSSTEXT']; } else { $crstext=$r['crimeSSSTEXT']; }
  14. give a little more detail on whats happening but i think your problem is your host doesn't support 1 minute crons.
  15. add this to globals   $curruri=$_SERVER['REQUEST_URI']; if(!preg_match("/\/mailbox?to/",$curruri) { $db->query("UPDATE `users` SET `mailingto`='' WHERE userid='{$userid}'"); }   may need to add a slash before the question mark but keep in mind this is not tested i came up with it on the spot
  16. if u want to add field to users do this: (not using mccodes so bare with me) add field [mysql]ALTER TABLE `users` ADD `mailingto` INT NOT NULL [/mysql] in mailbox.php in the send case add this where $db->query("UPDATE `users` SET `mailingto`='{$_GET['to']}' WHERE userid='{$userid}'");   in header.php where ever you want it to display add   $mtomeqr=$db->query("SELECT `username`,`userid` FROM `users` WHERE `mailingto`={$userid}"); if($db-num_rows($mtomeqr)) { echo "Users composing mail to you:"; while($mtome=$db->fetch_row($mtomeqr)) { echo "<a href=\"viewuser?u={$mtome['userid']}\">{$mtome['username']},</a>"; } }   there are about 3 more ways i can think of to do this.. and also ways to make it show for multiple users but this is a quick solution u can also do this using javascript so u dont have to refresh view this
  17. keep back-ups in the event someone does get bored and decide to hack ur game ;)
  18. javascript ya gotta love it
  19. i used x10hosting when i first started learning this stuff it was the first host i ever tried so dont run ur minute crons or they will freeze ur acct and wont give it back...but that was a while ago they may have changed their policy u should get some database ran crons or u can download xampp/wampp and run the test website from ur computer and there is a cron program made specifically for running mccodes crons that u can download
  20. get image size would be the better way cuz u could easily name a file "blah.png.php" then use htaccess to alow the .php part to not be needed then go to ur site and put in http://www.site.com/blah.png and there u have a fake png file
  21. yeah that security thing will mess up ur gets and posts as i used it when i didnt know much about security and it will mess up something with ur greater/less than bars i cant remember what it does but an easier way to make new lines apear is to either preg replace \n with   or nl2br();
  22. lmao cracks me up when people say i need these templates converted to mccodes or something like that
  23. what kind of a notification r u going for? an event? a pop up?... -------------- ^ probably would cause trouble for very popular threads
  24. i was just wondering how many fields in a table are considered to much and would slow down queries that associate with that table. if it depends on how many rows are in the table also say about 10k rows
  25. nice mod i think ill try it out but we could save pages by just adding the function to global functions
×
×
  • Create New...