Re: [PHP] Avoiding SQL injections: htmlentities() ?

2005-03-26 Thread Guillermo Rauch
With htmlentities() you are safe also to potential XSS attacks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mail() Alternative?

2005-03-23 Thread Guillermo Rauch
Another way is the famous phpmailer() class. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A little disturbing query !!!

2005-03-13 Thread Guillermo Rauch
> Hello, Hi, > $query = "SELECT * FROM templates where ".$_POST[searchtype]." LIKE > '%".$_POST[searchterm]."%'"; Although it works, always put the array index as a string between quotes. $_POST[searchterm] to $_POST['searchterm'] > > But now I need the search to be more advanced, the user may

Re: [PHP] mail()

2005-03-12 Thread Guillermo Rauch
fully, there're some other things to check. Best, Guillermo Rauch. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SimpleXML add a node

2005-03-11 Thread Guillermo Rauch
php.net/dom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sorting arrays

2005-03-08 Thread Guillermo Rauch
Hello Brian, Everytime you're looking for an specific function to do some job, look at the php functions list. In this case: http://ar2.php.net/manual/es/ref.array.php These are the most common ones i use: array_reverse usort uksort uasort and obviusly sort Hope this helps, Guillermo

Re: [PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Guillermo Rauch
Also, since this is a very massive list with high traffic, quote when necessary. For example, consider this message: > Can i draw something ? Yes you can > Thanks You're welcome In that case quote is quite useful :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP] Opening files....

2005-03-06 Thread Guillermo Rauch
te a .htaccess file like this: ErrorDocument 404 image.php In image.php you catch the referrer with $_SERVER['http_referrer'] and display the image sending the header img/jpeg > Also, Is there a way that I can force the .JPG files to open in a > particular software ? No. Best, G

Re: [PHP] Re: help with adding

2005-02-26 Thread Guillermo Rauch
You really don't have to put the index in a single dimension input array. Just put qty[] And you'll get it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] source code protection

2005-02-26 Thread Guillermo Rauch
> Hi there! > > What's the point of doing that? The PHP-codes are well protected if they are > on a well > configured server. Sometimes you want to sell protected code $.$ > > /G > @varupiraten.se -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

Re: [PHP] Like ternary but without the else.

2005-02-25 Thread Guillermo Rauch
On Fri, 25 Feb 2005 18:39:56 -0500, Brian V Bonini <[EMAIL PROTECTED]> wrote: > On Fri, 2005-02-25 at 13:36, Chris W. Parker wrote: > > How can I turn the following into something that resembles the ternary > > operator? > > > > > > > if($something) > > { > > $this = $that; > > } > > > >

Re: [PHP] what does this mean?

2005-02-25 Thread Guillermo Rauch
Including more than one you can make a complex control structure, not just if else $a = ($a == 0) ? ($b < $a ) ? $b : $a :$c; On Fri, 25 Feb 2005 13:26:51 -0600, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > on which page of php.net can I find out what this code does? > $a = $b? $a :"

Re: [PHP] best way todo a case insensitive str_replace

2005-02-21 Thread Guillermo Rauch
http://ar2.php.net/str_ireplace On Mon, 21 Feb 2005 15:54:33 -, pmpa <[EMAIL PROTECTED]> wrote: > Hi all. > > What is the best way to do a string insensitive replace? > Currently I am doing: > > $replace = "g r"; > $arr = explode(" ",$replace); > $text = "PHP is GreaT!"; > for($i=0;i $text

Re: [PHP] issue with accents and mysql

2005-02-15 Thread Guillermo Rauch
Try SHOW VARIABLES LIKE 'character_set%' and verify your character set is latin1. If not, see http://dev.mysql.com/doc/mysql/en/charset-database.html On Tue, 15 Feb 2005 22:04:30 +, mario <[EMAIL PROTECTED]> wrote: > Hello, > > please help me on the following issue. > please reply to [EMAIL

Re: [PHP] Fatal Error Handling

2005-02-09 Thread Guillermo Rauch
On Wed, 9 Feb 2005 08:21:25 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > James Taylor wrote: > > So finally quit that music thing and got a real job? :-) > > [Sorry. I'm sure you've heard them all, but I couldn't resist...] > > > I have a set of functions which are potentially dan

Re: [PHP] ability to use extract to $this vars in a class

2005-02-08 Thread Guillermo Rauch
If i understand you correctly, you want to extract all the keys and generate class members with them.. // Define class test class test { // We pass an array to the constructor function __construct( $arr ) { foreach($arr as $key => $val ) { $this-

Re: [PHP] Secure system calls -- how

2005-02-08 Thread Guillermo Rauch
This article may help: http://www.onlamp.com/pub/a/php/2003/08/28/php_foundations.html On Tue, 08 Feb 2005 20:38:48 +, Jennifer Goodie <[EMAIL PROTECTED]> wrote: > -- Original message -- > From: Niels <[EMAIL PROTECTED]> > > Hi list, > > > > I'm doing an intr

Re: [PHP] array_map() problems

2005-02-07 Thread Guillermo Rauch
Hi Jeffery, To use a class method as a valid callback, you should pass an array like $_POST = array_map(array($this, 'StripSlashesDeep'), $_POST); Hope this helps, -Guillermo On Mon, 7 Feb 2005 17:10:32 -0600, Greg Donald <[EMAIL PROTECTED]> wrote: > On Tue, 08 Feb 2005 09:37:11 +1100, Jeffery

Re: [PHP] Strange key behaviour

2005-02-07 Thread Guillermo Rauch
On Tue, 08 Feb 2005 00:19:20 +0100, Johannes Reichardt <[EMAIL PROTECTED]> wrote: > Hey there! Hi Johannes > > i have a routine like this: > > $myarray['1'] = 'aösldfjkasöldkjf'; > > foreach($myarray as $key => $value) { > echo $key{0}; // outputs nothing > echo substr($key,0); // outpu

Re: [PHP] help-regarding-file_get_contents

2005-02-07 Thread Guillermo Rauch
Does the server support passive FTP connections? Extracted from the PHP Manual: PHP 3, PHP 4, PHP 5. ftps:// since PHP 4.3.0 * ftp://example.com/pub/file.txt * ftp://user:[EMAIL PROTECTED]/pub/file.txt * ftps://example.com/pub/file.txt * ftps: