You are here: Re: form processing with input validations « PHP Programming Language « IT news, forums, messages
Re: form processing with input validations

Posted by Curtis on 02/01/07 02:47

On Sun, 28 Jan 2007 11:23:42 -0800, php newbie <arpit.00@gmail.com> wrot=
e:

>> php newbie wrote:
>> > I am creating a form Form1.php that posts to the another form
>> > Form2.php.
>>
>> > I have input validations on the first form. I need the user to go t=
o
>> > the next form ONLY if the inputs from the user are valid. I have no=
t
>> > been able figure out how to do this since the first form always pos=
ts
>> > to the next form no matter what.
>>
>> > I would really appreciate if somebody can share their php knowledge=

>> > and give me some idea on how this is done in php.
>>
>> > ThanksEither do validation in the second form, and if it fails, sen=
d =

>> them back
>> to the first form. Or, post to the first form and validate there. I=
f
>> it succeeds, go to the second form.
>>
>> Either way, you can save data in the $_SESSION for later retrieval.
>>
>> --
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> On Jan 28, 12:54 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>
> Thanks for a prompt reply. Is there a way to achieve this same result
> without using session?
> Any ideas!!

(Changed topposting to bottomposting)

There's really no reason to not use sessions here. However, to address t=
he =

previous concern that you can't use a header redirect to send the origin=
al =

data back to the first form, you could simply use fsockopen to send a PO=
ST =

request with (altered/validated) data, and have the PHP on the first for=
m =

display any default values that have been POST'ed.

This is really much more of a hassle than sessions. PHP will even =

automatically try and send a session cookie by default, but if it can't,=
=

it will use the query string.

-- =

Curtis

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация