You are here: Re: Question about form... « HTML « IT news, forums, messages
Re: Question about form...

Posted by Jonathan N. Little on 01/23/06 18:12

Travis Newbury wrote:
> Leszek wrote:
>
>>I tried something like this:
>><input type="button" value="<<Back" onclick="history.back()"/>
>>and it works with my browser
>> But is the input type="button" working with all browsers?
>
>
> What are you really trying to accomplish here?
>
The way I did it was to have one PHP script handle all pages of the
multipage form, then for each page I had two submit buttons...

#on Page 1
<input type="submit" name="back0" value="<<Back">
<input type="submit" name="next2" value="Next>>">

or

#on Page 2
<input type="submit" name="back1" value="<<Back">
<input type="submit" name="next3" value="Next>>">

Post to the same PHP script and by having a matrix at the start of the
script to took for which submit variable is set it can determine which
page to display. Also you can take the opportunity to validate the use
input and say if the user clicked to go to page 3 and the validation
fails you can redisplay page 2 with bad fields marked.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

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

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