Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. try htmlspecialchars
  2. if its "solved" then click solved :-\
  3. ECHO akitchin;
  4. and the "error" is ? also use str2lower() it will save alot of time..
  5. Erm.. a 10 char code, simple base 62 calc edit: ie 0000000000 to 9999999999 +1 000000000a you get the idea 62 being a-z + A-Z + 0-9
  6. the worst holes are the ones you don't know about , as for video shots i think you may need additial software, i know youtube use a flash media server for conversions,
  7. or use `Tables` but yes its better to change it (didn't even see that) time for a break i guess!
  8. its untested but basically it should..
  9. i am guessing that some of the data has a single quote try using addslashes ie $Name = addslashes($Name);
  10. do you have the table userregistration and with the field userstatus ?
  11. so you want [1][1] [2][1] [3][1] [1][2] etc maybe something simple like $NewArray = array(); foreach($theArray as $K => $V) { foreach($V as $nK => $nV) $NewArray[$nK][$K] = $V; } } will swap the numbers then use can use ksort
  12. @Adam1239, you can EDIT your last post.. you don't need to post over and over!
  13. OK can you echo "<pre>";print_r($YOURARRAY);echo "</pre>"; and post the results in a code tag and then in a 2nd code tag post what you want it to look like
  14. how is the array causing problems with an sql insert ? ???
  15. ksort or kRsort (reverse)
  16. a blank field should just be just blank ie testa, ,testc biggest problem is quotes maybe this $data = str_replace('"', '""', $Fields['MCity']); $text .= '"'.$data.'", ';
  17. do you mean this ? echo "<pre>"; print_r(apache_get_modules()); echo "</pre>";
  18. maybe use krsort
  19. comment out the query in $db->misc and replace it with a echo sql statement, i think your find.. the problem should reveal itself
  20. my bad, misread, table as database.. thanks for the correction wildteen88, i'll go dig that hole now
  21. if (!mysql_select_db("mydbname")) { // <---Tabe Selection "WHERE userstatus = 1"; is just part of the SQL statement just finds the records where field 'userstatus' = 1
  22. OK, if you add // Report all PHP errors (bitwise 63 may be used in PHP 3) error_reporting(0); ini_set('error_reporting', 0); to the start of your code, your it should be the same as turning error_reporting off via the php.ini, just may help with some testing
  23. how do you know if their a spammer ? thats the first question as soon as you know that you can code for it..
  24. I'm not sure that would be the case tho, because I can do a partial ban of his IP address, ie instead of the whole numeric address, I can simply find his provider information at the end of his IP address: well.... while you could ban the proxies as well it will go on for a long time.. (if you lucky, they don't know how to connect to a proxy server or have software to do it for them) the code is okay.. it doesn't need to be too complex but i have delt with these types of people before and i think your need to rethink the auto-activation part. i would probably code it like this <?php $banned[0] = "IP Address 1"; $banned[1] = "IP Address 2"; $banned[2] = "IP Address 3"; $banned[3] = "IP Address 4"; $Accepted[0] = "Username 1"; $Accepted[1] = "Username 2"; $Accepted[2] = "Username 3"; $Accepted[3] = "Username 4"; $ban = false; $ban = in_array($_SERVER['USERNAME'], $Accepted); $ban = (in_array($_SERVER['REMOTE_ADDR'], $banned))?true:$ban; if ($ban) { echo "You have been banned from this website."; echo "If you believe you have received this in error contact us."; echo "admin@blah.net"; } ?> edit: oops on the code (forgot to remove some lol)
  25. it check if the domain is a valid name for a domain, it doesn't check to see if it exists for example www.phpfreaks.com will work but phpfreaks.chimps will fail but www.wearenotfreaks.com will works (just it doesn't exist) i think thats what you were asking
×
×
  • 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.