Jump to content

witnot1

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Everything posted by witnot1

  1. Rather use a MVC Framework where you can have config file with several db connections. MVC will save you guys a lot of problems Witnot
  2. in your case yes, but without a framework, I would at least have a static class where I can reference my db object like so class Database { // Store the single instance of Database private static $m_pInstance; private function __construct() { ... } public static function getInstance() { if (!self::$m_pInstance) { self::$m_pInstance = new Database(); } return self::$m_pInstance; } } Then use that static object as such $pDatabase = Database::getInstance(); $aResult = $pDatabase->query('...'); globals are not nice to work with. Witnot
  3. Ensure that you pass through the email, subject, and headers when doing html email or else it will reach spam folder. There are nice mail classes which makes e-mailing easier to ensure you have atleast the correct criteria. Also note that e-mail goes to spam folder when, 1) subject is empty 2) body is too simplistic 3) header types are incorrectly formed Witnot
  4. You are starting your select echo with a ' which leads to $a not being read rather do as follow "<select name='$a'>"
  5. Thanks Denno, I think it is very difficult to limit the input by the text area's size even in jQuery. Looks like remaining character count is part of the solution.
  6. Hi , I would recommend using a framework i.e. a mvc framework like Zend which uses object orientation. class DB_Object { protected $_db; /* Getters and Setters*/ public function setDb($value) { $this->_db = $value; } } Then you can reference the member variable.
  7. Hi, I am trying to limit an user's input based on a text area size which is 180px. Is this even possible? There are ways to read how many linebreak's (\n) there are in a text area, but a long sentence will read as one linebreak. Any Ideaas?
×
×
  • 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.