|
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.
Navigation:
[Reply to this message]
|