Re: javascript, forms and php

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

 



DO NOT validate anything important with javascript, the user can easily
bypass the javascript by creating his own HTML page or disabling javascript
on his browser. if you *Absouloutly* need to use javascript, check the last
page the browser visited with Javascript or PHP and either allow or deny
access, still, even that is insecure. Now, for your main question, this is a
PHP board, not a Javascript board post this on a javascript list



On 12/1/05, Brent Baisley <brent@xxxxxxxxxxxx> wrote:
>
> You should have posted this to a javascript board, it has nothing to
> do with PHP. That said, if the form field name contains special
> characters, like [], you can reference it like this:
> document.formname.elements['checkbox1[]'].
>
> Use the elements[] reference style.
>
> On Dec 1, 2005, at 12:42 PM, Kelly Meeks wrote:
>
> > Hi all,
> >
> >
> >
> > I'm hoping someone can help me with this problem.
> >
> >
> >
> > I'm using javascript for some client side field validation in a form
> > (method=post) that gets managed via php.
> >
> >
> >
> > This particular form makes extensive use of checkboxes.  I've
> > always like
> > how when named properly (field name of "checkbox1[ ]"), php will
> > pass that
> > variable as an array that contains all the values selected in the
> > form.
> > Very handy.  BUT,
> >
> >
> >
> > How do you then reference that variable via javascript to do any
> > client-side
> > validation?  The code I use makes reference to the field's id, and
> > it still
> > doesn't seem to check things properly.
> >
> >
> >
> > Is there any way around this, or what am I missing?
> >
> >
> >
> > TIA,
> >
> >
> >
> > Kelly
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> >
>
> --
> Brent Baisley
> Systems Architect
> Landover Associates, Inc.
> Search & Advisory Services for Advanced Technology Environments
> p: 212.759.6400/800.759.0577
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux