php and frames...

From: Date: Mon, 19 May 2003 21:24:40 +0000
Subject: php and frames...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148214@lists.php.net to get a copy of this message
hey... does anyone know of a qucil/efficient way to determine what the current frame is? PHP_SELF gives you the page... is there a corresponding var that provides the frame.... the usual search on google didn't turn up anything... thanks bruce bedouglasEarthlink.net -----Original Message----- From: Jim Lucas [mailto:phplist@zonedzero.net] Sent: Monday, May 19, 2003 2:10 PM To: Sano Cc: php-general Subject: Re: [PHP] Default values I have a nice little function for this. function alternate(&$a, $b) { return ( $a = ( $a ? $b : $b ) ); } this will work as long as you know what you should be expecting. <?php function alternate(&$a, $b) { return ( $a = ( $a ? $b : $b ) ); } alternate($_POST['query'], ''); $select = "SELECT * FROM table WHERE colName='".$_POST['query']."'"; ?> this would normally cause an error that would stop the script, but since you have defined the value of $_POST['query'] to something( be it blank) that it will now not give you an error. Have fun with it... :) Jim Lucas ----- Original Message ----- From: "Sano" <sano@szm.sk> To: <php-general@lists.php.net> Sent: Saturday, May 17, 2003 2:01 PM Subject: [PHP] Default values > Greetings, > what would I have to do to initialize all possible variables with a default > value... > > Like any variable name given will return a integer "-1" ??? > > possible? > > mail me please. > sano@szm.sk > > thanx > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#148214) next »