You are here: Re: Variable in a form do not update with graphic buttons? « PHP Language « IT news, forums, messages
Re: Variable in a form do not update with graphic buttons?

Posted by Tyrone Slothrop on 10/22/05 18:08

On Sat, 22 Oct 2005 08:27:26 +0200, Otto <ohaldi@freesurf.ch> wrote:

>Hello
>
>I have a PHP script where I changed the buttons to graphic
>buttons.
>
>Before:
>?>
><input type='submit' name=mode value='Suivant'>
><input type='submit' name=mode value='Enregistrer'>
>
>After:
>?>
><input type="image" src="images/co_next.png"
>alt="Affiche le nom suivant!"
>name=mode value="Suivant">
>
><input type="image" src="images/co_save.png"
>alt="Enregistrer les modifications!"
>name=mode value="Enregistrer">
>
>etc.
><?php
>
>Unfortunately the mode variable do no change any more.
>Could somebody help me or tell me why when I'm using
>type='submit' that works and not any more with
>type='image' ?
>
>Or how can I resolve this problem?
>
>Many thanks in advance for your help.
>
>Regards
>
>Otto

Otto:

Look at this:
http://wiki.opensymphony.com/display/WW1/Multiple+Graphical+Submit+Buttons?focusedCommentId=3345

I believe you are getting "x" and "y" values being passed as well.
You may have to evaluate the mode key differently:
<?
foreach ($_POST as $k=>$v) {
if (strstr ($k, "mode") { $mode = $v; }
}

 

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

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