Jump to content

mikesta707

Staff Alumni
  • Posts

    2,965
  • Joined

  • Last visited

Everything posted by mikesta707

  1. data not files? does that mean you need to upload data that isn't a file? have you looked into a database? please explain your problem better
  2. <?php if($_SESSION['username']) { include('menu.php'); echo "Welcome, ".$_SESSION['username']; } else { ?> <form action="login.php" method="post"> <p align="right"><label><b>Username:</b> <input type="text" name="username" size="10" value="<? echo $username; ?>"></label> <label><b>Password:</b> <input type="password" name="password" size="10" value=""></label> <input type="submit" value="Login!"> </p> </form> <?php } ?> try that? [/code]
  3. Just tested your code and it works perfectly on my server
  4. $totrow = 0 while($cr2=mysql_fetch_array($res2)){ $totrow+=$cr2["total"]; ///the $totrow will echo below 5 time each price in database 5.67 which the total should be 28.35 // echo $cr2["total"]; } echo "total: $totrow";
  5. are the include paths in your php pages absolute or relative?
  6. just remove any html that is in the included page. Having multiple head and html tags in the same page is not valid HTML anyways. Unless you absolutely need the html. if you post the page though, I can give a more definite answer
  7. I don't see why not.
  8. you can append more variables to the url with the & symbol. IE index.php?id=5&othervar=othervalue
  9. touche
  10. replace the base64_encoded version of unset with the base64_encoded version of hello. $file = file_get_contents('code.php'); $file = str_replace('<?php', '', $file); $file = str_replace('<?', '', $file); $file = str_replace('?>', '', $file); $file = str_replace(base64_encode('unset'), base64_encode('hello'), $file);
  11. theoretically function createAll($length = 6){ $used = array(); $chars = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','R','S','T','U','V','W', 'X','Y','Z','1','2','3','4','5','6','7','8','9','0'); $x = 0; while ($x < pow(count($chars), $length)){ $word = ""; for ($i = 0; $i < length; $i++){ $word .= $chars[rand(0, count(chars))]; } if (!in_array($word, $used)){ $used[] = $word; $x++; } } print_r($used); } createAll(); that might work. But that exceeded the max execution time of 60 seconds on my local host. but like cags said for just 6 character strings (and that is ONLY 6 character strings, not 5 character or below) that you are going to have over 300 million different words. And then you have to md5 them? the function I just wrote probably won't be able to execute unless you let your server run for a while. are you trying to make a rainbow table or something?
  12. that is because this base64_decode('ZWNobyAidW5zZXQiOw==') which results in unset isn't executed when you call file_get_contents. the variable file looks like $file = "eval(base64_decode('ZWNobyAidW5zZXQiOw=='));";
  13. post the error? assuming your $_POST['box'] array isn't infintely long that for loop wouldn't cause an infinite loop
  14. true, but its slightly better than a cookie, which they can simply change by going to its file or using a javascript injection. at least they have to close and reopen the browser haha. might deter the lazy hacker. I would probably go with some sort of database option like abazoskib said
  15. $savelocation="./upload/".$horseid."test.jpg"; ?
  16. what does the file variable look like?
  17. ahh makes sense. I am a student so I do probably average around 5-10 dollars a day on food, and have some 12 hour days (2 jobs + full time school) But i have vacations and weekends so its all gravy in the end I suppose
  18. I'm a real man, so I play PC games. I still don't understand how you can play a shooter without a mouse
  19. Detecting "hack" attempts is a pretty broad topic, but for your specific case (IE detecting multiple login attempts) you could have a session store how many times they fail to log in (or a cookie if you want, but it would be mroe secure with a session) You could also use abazoskibs idea of storing the ip address.
  20. what should it be? that is exactly what your code should be doing. $string = $characters[mt_rand(0, count($characters))]; that will store a single character (a random one) into the $string variable. what do you want your code to do?
  21. Pretty much what I do are you a college student?
  22. i think here $string = $characters[mt_rand(0, $characters)]; you want it to be $string = $characters[mt_rand(0, count($characters))]; right now that basically looks like $string = $characters[mt_rand(0,"!@$%^&*()-==_[]\{}|;':,./<>?0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" )]; which doesn't really make sense
  23. maybe the query shouldn't return the results in descending order
  24. lol 5 dollars a day to eat. and 12 hours a week at 30 days per month? thats just absurd.
  25. oh sorry, yeah $string = str_replace("\n", '', $string); forgot about that
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.