Re: onClick

From: Date: Tue, 01 Mar 2005 12:19:23 +0000
Subject: Re: onClick
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-38726@lists.php.net to get a copy of this message
On Mon, 28 Feb 2005 21:41:45 -0500, Ron Piggott <ron.php@actsministries.org> wrote: > Another question: Is there a way that I may set up an IF command with the > onClick function so that my_web_page.php3 will not be displayed unless a web > form was used to generate it? Ron > if ur page was generated by a non-form-submit (anything else), the click wouldn't matter since ur page/form wasn't being used in the first place. so any client side javascript validation u wanna use won't even be called. On Tue, 01 Mar 2005 09:37:09 +0000, mel list_php <list_php@hotmail.co.uk> wrote: > I use a submit button with a name: > <input type='submit' name='cloningView' value='View'> > > and then I can test on that name: > if($_POST[cloningView]) > { > ...display new web page ...... > } > (i think) he means if(isset($_POST['cloningView'])) //add single/double quotes to avoid a warning. or if(isset($_POST['cloningView']) && $_POST['cloningView']) == 'View') depending on paranoia level, not that it'll help but i bet it makes u feel better ;-) but that can be faked quite easily. just make sure u check all GPC variables before using them. at the minimum, check if they exist. -- ]# Anirudh Dutt ...pilot of the storm who leaves no trace like thoughts inside a dream

« previous php.db (#38726) next »