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 axlq on 01/12/08 18:31

In article <8285a830-6c14-44bf-ae55-84122934817b@t1g2000pra.googlegroups.com>,
<ktstone2678@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

 

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

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