Reply to Re: php textbox GET values become unchangeable

Your name:

Reply:


Posted by edfialk on 06/19/06 16:07

I got everything set, you were right I locked in the values, rookie
mistake.
Thanks both of you.

mens libertina wrote:
> edfialk@gmail.com wrote:
> > some example code:
> >
> > $mapTime = $_GET["mapTime"];
> > if (isset($mapTime))
> > echo "document.form1.mapTime.value= '".$mapTime."';\n";
> >
> > Map Time: <input type="text" name="mapTime" value="2006-03-01">
>
>
> I'm not sure what you wrote here, whether you are showing 5 lines of
> your PHP script or if you are showing 4 lines of the PHP and the
> result. But by setting the value to "2006-03-01", you are locking in
> that value so it can't change. I think what you probably want to do in
> your PHP script is something like:
>
> $mapTime = $_GET["mapTime"]; // Grab the user's input
>
> if ( !isset($mapTime) ) // User didn't enter anything
> $mapTime = <default value>; // So set $mapTime to a
> default value
>
> echo "document.form1.mapTime.value= '".$mapTime."';\n"; //Will
> either be the user's last input, or your default
>
> I hope this helps.

[Back to original 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

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