Re: about forms with php
| From: | Meltem Demirkus | Date: | Fri, 20 Sep 2002 12:03:23 +0000 |
| Subject: | Re: about forms with php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117001@lists.php.net to get a copy of this message | ||
by the way If I remove return false .. script is checking the correctness
but just after it is going to the page "sign_up_ page .php "..I just want
it to go to the page when the email is correct ..
Is it possible to manage ?
meltem
----- Original Message -----
From: "Jon Haworth" <jhaworth@witanjardine.co.uk>
To: <php-general@lists.php.net>
Sent: Friday, September 20, 2002 2:48 PM
Subject: FW: [PHP] about forms with php
> Hi,
>
> > <form name="sign" method="POST" action="sign_up_.php"
> > onSubmit="checkemail(email.value);return false" >
> >
> > and when I click submit.. javascript is working but
> > it is not going to the sign_up_ page ......
>
> It's because of the "return false": that means "after running the
checkemail
> function, cancel the form submission".
>
> I think you want to have your function return true or false depending on
> whether the email address is OK, and take the return out of the onsubmit
> handler.
>
> Don't forget to validate the email address on the server as well,
otherwise
> people who turn off Javascript will be able to submit dodgy data.
>
> Cheers
> Jon
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>