Jump to content

Mchl

Staff Alumni
  • Posts

    8,466
  • Joined

  • Last visited

Everything posted by Mchl

  1. In 'strongest' you check if number is numeric, so why escape it?
  2. I think not. It's better to export data, recreate tables, and reimport data as utf-8.
  3. It's accessing property name of object $meta. It's probably most basic part of object oriented programming. See http://pl.php.net/manual/en/language.oop5.php for more info on objects and classes.
  4. DELETE FROM messages WHERE ID != 1 AND ID != 2 ;
  5. If ($_POST['processform'] != 1) && (ErrorMsg != "") { or If (!($_POST['processform'] == 1 || ErrorMsg == "")) { Besides, I believe ErrorMsg is a variable so: $ErrorMsg
  6. webref.eu: syntax in general is: if (condition) { } condition is always in () parentheses
  7. If ($_POST['processform'] != 1 || ErrorMsg != "") { AND => && OR => || waynewex: de Moragn's laws apply
  8. I'm pretty sure you shouldn't have table like that... echo $i . ". " . str_replace($notallowed,"",$meta->name) . "<br />";
  9. Don't quite understand what you're doing, byt $notallowed has to be an array $notallowed = array("0","1","2","3","4","5","6","7","8","9"); And $result is not a string, so you cannot use str_replace on it...
  10. Why not: $datetime = "16/08/2008 00:04:40"; $datetime = str_replace("/","-",$datetime); $time = strtotime($datetime); echo date("Y-m-d H:i:s",$time);
  11. SMS is not an email. There needs to be a gateway between the two. Many carriers provide such gateways, so people treat it as granted.
  12. Not necessarily. There are internet gateways as well. I know an operator who allows sending sms through e-mails. Might be a way.
  13. Can't fin it in IE7 either. I know it's possible to set it up in FF3
  14. I usually do an Object class and dbInterface class for it, which deals with fetching data from database, and then instantiates Object and sets its properties. abstract class dbObjectInterface { public static function get('ID') { $data = getDataFromDB(); $object = new Object(); $object->setData($data); return $object; } }
  15. There are specialised functions for parsing date and time. Try them http://pl.php.net/datetime
  16. I'd go for PDF. But that's perhaps because I got used to FPDF and can do simple good looking tables quite quick. Printing from browser on the other side is usually a fuss...
  17. It's in browser's print settings. CSS has nothing to do with it.
  18. The 'Big Header' is 'on top' of these links. You can use Firebug extension for Firefox to see it.
  19. For me infected flash drives are also considerable source (for me personally it's the single source of successful infection in the last few years).
  20. You might not have much choice... Some live hosting servers are configured to not display any error messages at all for security reasons. Use exceptions
  21. I started with BASIC... but it has nothing to do with VB
  22. Try mine. (it's part of your code with mysql_real_escape_string added)
  23. I never could get used to VB... It wasn't simple to me at all...
  24. Xdebug is an interesting php debugging tool. Helps a lot.
×
×
  • 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.