Re: [PHP] Trying to understand sessions and using them to authenticate...

2007-08-24 Thread Borokov Smith
Daniel Brown schreef: On 8/24/07, Borokov Smith <[EMAIL PROTECTED]> wrote: [snip] A warrant about your example not being validated, will most likely not stop the OP from using this code as is, thereby subjecting himself to SQL injection. And all it needed was mysql_real_escape_strin

Re: [PHP] Trying to understand sessions and using them to authenticate...

2007-08-24 Thread Borokov Smith
Daniel Brown schreef: Keep in mind that, as always, this hasn't been bug-checked, re-read, or otherwise validated. A warrant about your example not being validated, will most likely not stop the OP from using this code as is, thereby subjecting himself to SQL injection. And all it nee

Re: [PHP] Server error

2007-08-21 Thread Borokov Smith
Hi dr Nick, The $_FILES autoglobal contains an error code if something went wrong. What is the code set to ? Regards, boro Humani Power schreef: Hi everybody. I have a Fedora Core 7 with php 5, and I want to upload an image. The funniest thing is that my script works fine in other computer bu

Re: [PHP] Re: isset($a->b) even if $a->b = null

2007-08-17 Thread Borokov Smith
Maybe if you tell us exactly what you wish to achieve. Class variables that are not created at object creation is bad design. Olav Mørkrid schreef: yes, but that assumes you have a defined class. if $a comes from mysql_fetch_object() for instance you have just a stdobject, and this method will p

Re: [PHP] isset($a->b) even if $a->b = null

2007-08-17 Thread Borokov Smith
Olav Mørkrid schreef: how do i test if a property of a stdclass object is set, even if its value is null, similar to how array_key_exists() works for arrays. the following method fails: $a->b = null; if(isset($a->b)) echo "yes"; and property_exists() seems only to work for defined obje

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Borokov Smith
if (isset($_GET['order'] && in_array($_GET['order'], array('Last', 'First', ...))) { $requestedOrder = $_GET['order']; } else { $requestedOrder = ; } Mind the in_array() call. Always sanitize user input. greetz, boro Jason Pruim schreef: Hi All :) Hope you're not getting sick of my questi

Re: [PHP] javascript in or in ?

2007-08-07 Thread Borokov Smith
Yes. Just yes. regards, boro Greg Donald schreef: On 8/7/07, Robert Cummings <[EMAIL PROTECTED]> wrote: Yeah, the numbers really show Python and Ruby winning... NOT *LOL*. You mean how both Ruby and Python list serv traffic is way up while PHP's is way down? Even the PHP dev list i

Re: [PHP] OT A public apology to Larry Garfield

2007-08-07 Thread Borokov Smith
Personally, I think Garfield is the worst comic in existence no matter how Larry Garfield feels about it ! greetz, boro tedd schreef: Hi gang: In the long winded debate over copyright infringement vs thievery, I made an unkind and untrue inference re Larry Garfield. So, as a matter of pub

Re: [PHP] How to implement a plugin system?

2007-08-06 Thread Borokov Smith
Hey Hamza, require_once($chosenPlugin . '.class.php'); $obj = new $chosenPlugin(); return $obj; And you can start from there. hth, boro Hamza Saglam schreef: Hello all, I am working on a project which needs to have some sort of plugins architecture and I am kinda stuck. Basically I want

Re: [PHP] DOMDocument -> loadHTML() cuts off html input

2007-08-01 Thread Borokov Smith
Hey, Thanks for your reply. Yes there are quotes and 'special characters' in the list: ... Acodev Africa Co-operative Action Trust Agence européenne pour le Développement et la Santé Agência de Notícias Esperança ... The list gets cut off after the 'Agence européenne pour le développement e

Re: [PHP] $_POST- Vars -> Back-Button

2007-08-01 Thread Borokov Smith
Hey Chris, 1) Use sessions (read up on it if you don't know it; in short: session_start() at the very beginning of your script creates a $_SESSION array that is persistent through subsequent page calls) 2) Submit the form to the search page and preprocess it by putting the post vars into the s