phpSensei
Members-
Posts
2,838 -
Joined
-
Last visited
Never
Everything posted by phpSensei
-
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.
-
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..
-
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).
-
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)
-
Hi AlenD, You can use ORDER BY in mysql, but something tells me you want something more than this?
-
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..,,
-
Update script, saying successful, but isn't.
phpSensei replied to thereaper87's topic in PHP Coding Help
Do a var_dump($_post) -
Update script, saying successful, but isn't.
phpSensei replied to thereaper87's topic in PHP Coding Help
What is the error ouput? -
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; ?>
-
Ah, See you don't always need us...
-
I know what you are referring too, however I will still don't understand what you mean by " wont bring my box back.
-
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.
-
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
-
Can you link me to the page you are editing?
-
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.
-
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.
-
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
-
Hi there, PHP runs on the server side, so the user can't see the code, so I don't see a problem here.
-
Topic SOLVED! All i needed was this
-
Hi Dom, I don't understand why you are using Javascript for this?
-
It doesn't really matter, if either page has a security hole, it doesn't matter what page it sends its information to.