Reply to Re: [PHP] Multipage form redux

Your name:

Reply:


Posted by Marcus Bointon on 10/21/20 11:22

On 27 Jul 2005, at 21:22, Jack Jackson wrote:


> Right. Except I would rather have it working in a session because I
> specifically do not want to have the form sending $_POST data back
> and forth to the browser six times for several reasons. SO I'd like to
>
> Page1 // User enters first batch of data, presses SUBMIT at bottom.
> Data is cleaned and written to SESSION, user passed to Page2
>
> repeat as necessary to last page. At last page, process and error
> check newest input, then commit it, plus all previously stored
> session info to db.
>

As has also been said, Javascript can do this really nicely. The best
example I've seen of this is in Mambo's (a popular PHP CMS) admin
interface. It uses a tabbed multi-page form with client-side
validation. It's really just one big page, so if the user has JS
turned off, they will get one big form with no client-side
validation, but it will still work. It's a really elegant way of
working. It doesn't require any server interaction between pages -
nothing is submitted until the form is complete.

See here for a howto: http://www.devx.com/webdev/Article/10483/1763/
page/1

Admittedly this approach doesn't easily allow to you abandon and
resume later (unless you get clever with JS and cookies).

For keeping data in a session, you could combine this approach with
Ajax: http://particletree.com/features/smart-validation-with-ajax

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk

[Back to original 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

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