You are here: Re: Two Submit buttons on one form « PHP Programming Language « IT news, forums, messages
Re: Two Submit buttons on one form

Posted by ktstone2678 on 01/13/08 01:20

On Jan 12, 1:31 pm, a...@spamcop.net (axlq) wrote:
> In article <8285a830-6c14-44bf-ae55-841229348...@t1g2000pra.googlegroups.com>,
>
> <ktstone2...@gmail.com> wrote:
> >I have a basic shopping cart setup, currently the user clicks a button
> >to remove an item from the cart. The form action posts to itself in
> >order to update the item list.
>
> >Is it possible to have another button in the same form that posts to a
> >different location?
>
> Why would you want to do that? Why not just have the second submit
> button post to the same location? Two submit buttons on the same
> form can perform two different functions. I do this all the time.
> The buttons have different value parameters, the php script picks up
> on which one was clicked, and acts accordingly.
>
> If you want two buttons in the same form to post to different
> locations, you need javascript to modify the form URL. Not a good
> idea, IMO, to rely on javascript when you don't have to.
>
> -A

Ideally that's would I would like to do. I need to do research on how
to accomplish that , but I think that's the best solution. Thanks for
you advice everyone

 

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

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