Re: [PHP] Form validation and save the form

2010-01-11 Thread Bastien Koert
On Mon, Jan 11, 2010 at 10:18 AM, Angelo Zanetti  wrote:
>
>
> -Original Message-
> From: aditya shukla [mailto:adityashukla1...@gmail.com]
> Sent: 11 January 2010 05:03 PM
> To: Robert Cummings
> Cc: Angelo Zanetti; php-general
> Subject: Re: [PHP] Form validation and save the form
>
> Thanks for the reply guys.Do you guys know a good resource where i can read
> from about form validation through PHP.There a lot on google but please
> suggest something if you guys know.
>
>
> Thanks
>
> Aditya
>
> I think just do some form validation tutorials (google for them).
> These will help you to understand the validation process in more detail.
>
> Regards
> Angelo
> http://www.elemental.co.za
> http://www.wapit.co.za
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


I still like

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Form validation and save the form

2010-01-11 Thread Angelo Zanetti


-Original Message-
From: aditya shukla [mailto:adityashukla1...@gmail.com] 
Sent: 11 January 2010 05:03 PM
To: Robert Cummings
Cc: Angelo Zanetti; php-general
Subject: Re: [PHP] Form validation and save the form

Thanks for the reply guys.Do you guys know a good resource where i can read
from about form validation through PHP.There a lot on google but please
suggest something if you guys know.


Thanks

Aditya

I think just do some form validation tutorials (google for them).
These will help you to understand the validation process in more detail.

Regards
Angelo
http://www.elemental.co.za
http://www.wapit.co.za



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



Re: [PHP] Form validation and save the form

2010-01-11 Thread aditya shukla
Thanks for the reply guys.Do you guys know a good resource where i can read
from about form validation through PHP.There a lot on google but please
suggest something if you guys know.


Thanks

Aditya


Re: [PHP] Form validation and save the form

2010-01-11 Thread Robert Cummings

Angelo Zanetti wrote:


-Original Message-
From: aditya shukla [mailto:adityashukla1...@gmail.com] 
Sent: 11 January 2010 07:37 AM

To: php-general
Subject: [PHP] Form validation and save the form

Hello Guys,

I am trying to validate a form for user input , such that when something is
missing load the form again by focusing on the  wrong field.Say i don not
enter my address so when the form loads everything else is saved and the
form points to address field.

Thanks

Aditya

You need Javascript for that not PHP. PHP is server side, javascript is
client side (browser).


He doesn't say anything about not reloading the form... in fact he 
explicitly says "when something is missing load the form again". This 
suggests a server request and not JavaScript. Either way... validation 
can occur either in JavaScript or PHP... but it should ALWAYS occur in 
PHP regardless of any JavaScript validation.


Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

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



RE: [PHP] Form validation and save the form

2010-01-11 Thread Angelo Zanetti


-Original Message-
From: aditya shukla [mailto:adityashukla1...@gmail.com] 
Sent: 11 January 2010 07:37 AM
To: php-general
Subject: [PHP] Form validation and save the form

Hello Guys,

I am trying to validate a form for user input , such that when something is
missing load the form again by focusing on the  wrong field.Say i don not
enter my address so when the form loads everything else is saved and the
form points to address field.

Thanks

Aditya

You need Javascript for that not PHP. PHP is server side, javascript is
client side (browser).

Regards
Angelo 
http://www.elemental.co.za
http://www.wapit.co.za




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



Re: [PHP] Form validation and save the form

2010-01-10 Thread Paul M Foster
On Sun, Jan 10, 2010 at 11:37:06PM -0600, aditya shukla wrote:

> Hello Guys,
> 
> I am trying to validate a form for user input , such that when something is
> missing load the form again by focusing on the  wrong field.Say i don not
> enter my address so when the form loads everything else is saved and the
> form points to address field.

Typically, you would direct the form back to itself. Then at the top of
the form, you'd put a test to determine if the form has been processed
before or if this is the first time through. Then you make your decision
about missed fields, etc. Like this:

== someform.php ==

HTML crap goes here...

== end of someform.php ==

You'll notice that if there are entry errors, execution falls through.
In that case, you'll need to do something like this for fields:



so that the entered data shows up in the fields. First time through, the
value attribute will yield nothing.

Paul

-- 
Paul M. Foster

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



[PHP] Form validation and save the form

2010-01-10 Thread aditya shukla
Hello Guys,

I am trying to validate a form for user input , such that when something is
missing load the form again by focusing on the  wrong field.Say i don not
enter my address so when the form loads everything else is saved and the
form points to address field.

Thanks

Aditya