Re: onClick

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 28 Feb 2005 21:41:45 -0500, Ron Piggott
<ron.php@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> 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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux