Jump to content

phpSensei

Members
  • Posts

    2,838
  • Joined

  • Last visited

    Never

Everything posted by phpSensei

  1. Hi Sean, If you want to insert use INSERT not UPDATE. I also don't understand the problem here, you already seem to have figured it out as you explained your situation.
  2. Hi Guys, I just wanted to see the number of guys/girls around here that exercise regularly. I usually keep my programming limited to 5-6 hours a day from morning time, then go to the gym, and then back to some more programing. Its not like that always, I do have plans and such with family friends, but its interesting to see how you guys balance out your day..
  3. I guess the connection's error isn't controlled by mysqli itself? However, From the manual: mysqli_report() is a powerful function to improve your queries and code during development and testing phase. Depending on the flags it reports errors from mysqli function calls or queries which don't use an index (or use a bad index).
  4. Hi there, I fail to see why mysqli_report doesn't turn off internal errors. The only thing turning off the errors is error_reporting, or maybe I am not seeing something here. At the moment, this is what's working. <?php mysqli_report(MYSQLI_REPORT_OFF); // Has no effect on the error output error_reporting(E_STRICT); class Valley_Mysqli extends mysqli{ public function __construct($V_Host,$V_User,$V_Pass,$V_Name){ parent::__construct($V_Host,$V_User,$V_Pass,$V_Name); try{ if(mysqli_connect_errno()){ throw new Valley_Error('Mysqli Cannot Connect',mysqli_connect_errno()); } }catch(Valley_Error $e){ print $e->getMessage(); } } } class Valley_Error extends Exception { public function __construct($mysqli_error_msg, $mysqli_error_code = 0, Exception $previous = null) { // assigned values properly parent::__construct('Mysqli Error Msg: '.$mysqli_error_msg, $mysqli_error_code , $previous); } } ## Testing $db = new Valley_Mysqli('localhost','root','','valley'); ?> MYSQLI_REPORT_OFF Turns reporting off MYSQLI_REPORT_ERROR Report errors from mysqli function calls MYSQLI_REPORT_STRICT Throw mysqli_sql_exception for errors instead of warnings MYSQLI_REPORT_INDEX Report if no index or bad index was used in a query MYSQLI_REPORT_ALL Set all options (report all)
  5. Hi AlenD, You can use ORDER BY in mysql, but something tells me you want something more than this?
  6. There's members on here pm'ing me on typing entire modules and projects as a means of helping them get on their way. The reality of it is that most people do it for the money, while we actually enjoy what we do. In my opinion there's a fine line between asking for help and asking someone to do everything for you by sugar coating it with innocent posts acting like they are clueless..,,
  7. You can REGEX (preg_replace), however I think you can also use a string function if not, the least you can do <?php # Your Zip Code $zip=801129999; # Check if the length == 9 if(strlen($zip) == 9){ $zip = substr($zip,0,5) . '-' . substr($zip,5,9); } print $zip; ?>
  8. I know what you are referring too, however I will still don't understand what you mean by " wont bring my box back.
  9. The PHP_SELF element can in fact be altered by the user to include any kind of malicious XSS code he/she desires What an exagerated statement... You can simply filter the element.
  10. The real issue isn't what you store in them, other than passwords and such which shouldn't be stored inside anything, its how secure your cookies and sessions are, some people hijack sessions/cookies in order to access parts of your site.. read here: http://phpsec.org/projects/guide/4.html
  11. BTW, I also suggested to the OP on Private Message about an Ajax method, just so anyone else is interested http://www.google.ca/search?sclient=psy&hl=en&source=hp&q=ajax+upload+progress+bar&aq=1&aqi=g3g-v2&aql=f&oq=&pbx=1&biw=1920&bih=883&cad=cbv
  12. Can you link me to the page you are editing?
  13. Np, 1. You can set a cookie or a session, but sessions are safer than cookies for storing valuable information. The sessions stored on the server, so when you call session_start() you can grab that data, regardless if they leave the site or not. 2. a SESSION is a combination of cookies and a session, a Cookie itself is a key/value pair stored on the client's computer, not the server itself. 3. They can't see the sessionID unless you disabled session cookies, but thats frowned upon. The sessionID is inside the cookie which stores it, the session holds data (I.e. user ID). No the user can never see another user's cookies, only their own.
  14. Regarding mjdamato's reply, This may not be related to the deleting a query based on a time interval but I woud actually have a field called 'active' or 'deleted' or 'w.e', so instead of deleting it I update this column to true or false instead of deleting them.
  15. Consider using punctuation in your URLs. The URL http://www.example.com/green-dress.html is much more useful to us than http://www.example.com/greendress.html. We recommend that you use hyphens (-) instead of underscores (_) in your URLs. I think you should consider how search engines will pick up the URLs also.. So its best not to user underscores. Have a read here http://www.google.com/support/webmasters/bin/answer.py?answer=76329
  16. Hi there, PHP runs on the server side, so the user can't see the code, so I don't see a problem here.
  17. Hi there, I am pretty sure you can figure out a simple way of integrating multiple uploads.
  18. Topic SOLVED! All i needed was this
  19. Like this one? PHP 5.2 has added C-level hooks for this type of function. http://progphp.com/progress.php http://blog.liip.ch/archive/2006/09/28/upload-progress-meter-extension-for-php-5-2.html http://the-stickman.com/web-development/php/upload-progress-tracking-in-php52/
  20. Hi Dom, I don't understand why you are using Javascript for this?
  21. It doesn't really matter, if either page has a security hole, it doesn't matter what page it sends its information to.
×
×
  • 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.