Re: [PHP] if(true && false) //??

2005-07-09 Thread André Medeiros
Oops my bad... misread it :( On 7/9/05, André Medeiros <[EMAIL PROTECTED]> wrote: > That's the same as having > > if( !isset( $_SESSION['PrevUrl'] ) ) { > //do something here > } > > On 7/9/05, Marco Tabini <[EMAIL PROTECTED]> wrote: > &g

Re: [PHP] if(true && false) //??

2005-07-09 Thread André Medeiros
That's the same as having if( !isset( $_SESSION['PrevUrl'] ) ) { //do something here } On 7/9/05, Marco Tabini <[EMAIL PROTECTED]> wrote: > It can't -- that looks like some leftover debugging code to me. > > > Marco > > > On 7/9/05 10:50 AM, "Sam Smith" <[EMAIL PROTECTED]> wrote: > > > > > I

Re: [PHP] IBM's Learning PHP Part 1 tutorial.

2005-07-06 Thread André Medeiros
On Wed, 2005-07-06 at 14:12 +0100, Richard Davey wrote: > Hello Bill, > > Wednesday, July 6, 2005, 3:36:09 AM, you wrote: > > BM> I'm working my way through IBM's PHP tutorial. Generally good ... > BM> but I'm stuck at an error point and have no idea what's going > BM> wrong. Before adding a new

Re: [PHP] IBM's Learning PHP Part 1 tutorial.

2005-07-06 Thread André Medeiros
On Tue, 2005-07-05 at 22:36 -0400, Bill McEachran wrote: > Newbie question. > > I'm working my way through IBM's PHP tutorial. Generally good ... but > I'm stuck at an error point and have no idea what's going wrong. > Before adding a new row to the mysql database (already opened) we do a > que

Re: [PHP] alternative to empty

2005-07-06 Thread André Medeiros
On Wed, 2005-07-06 at 13:20 +0200, Angelo Zanetti wrote: > what about checking that the length is >0 > Checking if length > 0 requires calling a function, wich takes longer (it's a ridiculous difference, but still...) > but i think the other suggestions are fine. >

Re: [PHP] alternative to empty

2005-07-06 Thread André Medeiros
On Wed, 2005-07-06 at 20:23 +1000, Dan Rossi wrote: > On 06/07/2005, at 7:55 PM, Ross wrote: > > > I have been using empty in forms for some time now. but have just > > discovered > > that > > > > PHP 4 As of PHP 4, The string value "0" is considered empty. > > > > > > > > > > If ($string

Re: [PHP] alternative to empty

2005-07-06 Thread André Medeiros
On Wed, 2005-07-06 at 10:55 +0100, Ross wrote: > I have been using empty in forms for some time now. but have just discovered > that > > PHP 4 As of PHP 4, The string value "0" is considered empty. > > > > > Is there an alternative that will just check for empty strings. I suppose I >

RE: [PHP] maximum execution time error

2005-07-05 Thread André Medeiros
On Tue, 2005-07-05 at 10:56 -0500, Jay Blanchard wrote: > [snip] > Is there a way to, on a script by script basis, change the maximum > allowed time that a script is allowed to run? > [/snip] > > http://www.php.net/set_time_limit > More specifically... set_time_limit( 0 ); -- PHP General Ma

Re: [PHP] is there way to pass an array( or variables) to another page without sessions or cookies?

2005-07-05 Thread André Medeiros
On Tue, 2005-07-05 at 13:09 +0100, Ross wrote: > is there way to pass an array( or variables) to another page without sessions > or cookies? > > Thanks, > > > > R. > > serialize / base64_encode through the URL / a form perhaps? -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Ouput HTML w/PHP

2005-06-30 Thread André Medeiros
On Thu, 2005-06-30 at 08:50 -0400, Rick Emery wrote: > And now for something completely different... > > I have a question that has been nagging at me. I've searched the > archives, FAQs, and web sites, but haven't found an answer. > > I have two ways that I've output HTML with PHP; one is to wr

Re: [PHP] turn off the www

2005-06-29 Thread André Medeiros
People have fun with the oddest things ;) Anyway, it's a nice reference to have around :) On 6/29/05, Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > OK OK I got it ;) > > > > I just suggested it because I thought he could assume that "www." > > would always be on the string. > > > > Either way,

Re: [PHP] turn off the www

2005-06-29 Thread André Medeiros
OK OK I got it ;) I just suggested it because I thought he could assume that "www." would always be on the string. Either way, I guess _one_ preg_replace is alright. On 6/29/05, Kevin L'Huillier <[EMAIL PROTECTED]> wrote: > > > Wouldn't > > > > > > $newUrl = 'https://' . substr( $_SERVER['SERVER

Re: [PHP] turn off the www

2005-06-29 Thread André Medeiros
On Wed, 2005-06-29 at 10:57 -0700, Philip Hallstrom wrote: > > I am using the following code to turn http into https and get my ssl > > working. > > > > if($HTTP_SERVER_VARS["HTTPS"] != "on") > > { > > $newurl = "https://"; . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; > > header("location

Re: [PHP] Zipping on the fly

2005-06-29 Thread André Medeiros
On Wed, 2005-06-29 at 13:28 -0400, Jack Jackson wrote: > hi, > I'm providing a download script which lets trusted users view a > directory and select a file to download; I don't want to store the files > zipped on the server. Is there a fast, built-in way to zip the selected > file on the fly an

Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-27 Thread André Medeiros
$cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' . $files . '} ' . $tmp_dir . '/'; That should work On 6/27/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Can not make this work inside a php script. > > Have tried several variations: > $cmd = "scp [EMAIL PROTECTED]:$direct

<    1   2