You are here: Re: Form Question « PHP Programming Language « IT news, forums, messages
Re: Form Question

Posted by Sjoerd on 05/22/06 20:18

Dave Mennenoh wrote:
> How can I differentiate between the two submits?

<input type="submit" name="foo" value="bar">
Clicking this button will post the form like there was a input field
with name foo and value bar. Look for $_POST['foo']. If it exists, the
button is clicked.


Another option is to use javascript to fill a hidden field. Something
like this:
<input type="hidden" name="TypeOfSubmit" id="TypeOfSubmit">
<input type="submit"
onClick="getElementById('TypeOfSubmit').value='1'">
<input type="submit"
onClick="getElementById('TypeOfSubmit').value='0'">

 

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

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