Hey Mark,

Thanks. I understand. I'm actually a Cold Fusion programmer.

I've tried what you suggested but can't seem to get it work - code attached.
However, I can display the radio button if I use the $_POST function.

I'm not sure if it's the version of php I'm using. Stats - windows 2000 Sp1,
Apache 2.039, php 4.2.2.

Thanks for taking the time!!

"Mark Middleton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> It looks like your code could use "variable variables" to help you out.
>
> ::::::::::: OLD CODE ::::::::::::::::
>
> > > for ($GameIdx = 1; $GameIdx <= 17; $GameIdx++) {
> > >  /* instead "hardcoding each radio button name - just do it
> > programmatically
> > > by concatenating / creating the name */
> > >  $frmGame = "Game" + $GameIdx;
> > >  if ($frmGame) {
>
> ::::::: END OF OLD CODE :::::::::::::
>
> ** this check will always be true - because you just set $frmGame equal to
a
> value... ***
> What you want to do at this point is use variable variables (where the
> variable name is actually
> a variable itself.
>
> ::::::::: NEW CODE :::::::::::
>
> > >  $var_frmGame = "Game" + $GameIdx;
> > >  $frmGame = $$var_frmGame;   // The "$$" is used for variable
variables
> > >  if ($frmGame) {
>
> :::::: END OF NEW CODE :::::::
>
> ** the above snippett is was I wrote to show the results of the dynamic
> (looped-through) variable $Game1, $Game2, ...
>
> I use this method when the number of form elements is variable.  Instead
of
> hardcoding the number "17" you might make a variable in the incoming form
> with the count of form elements (simply increment a variable with each
> printing of the form variable... then at the end of the form make <input
> type="hidden" name="elementcount" value="$count">)
>
> Then you can make the above for-statement look like this:
>
> > > for ($GameIdx = 1; $GameIdx <= $elementcount; $GameIdx++) {
>
> Does any of this make sense or help in any way?
>
> -Mark
>
>


begin 666 InsertPicks3.php
M/"%$3T-465!%($A434P@4%5"3$E#("(M+R]7,T,O+T141"!(5$U,(#0N,"!4
M<F%N<VET:6]N86PO+T5.(CX-"CQH=&UL/@T*/&AE860^#0H)/'1I=&QE/E!I
M8VMS(2$A/"]T:71L93X-"CQ-151!(&AT=' M97%U:78](D-O;G1E;G0M5'EP
M92(@8V]N=&5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&-H
M96-K('1O(&UA:V4@<W5R92 @("HO#0HO+R1G86UE,3$@/2 B,3$B.PT*:68@
M*"1?4$]35%LG9V%M93$G72D@>PT*"7!R:6YT(")G86UE,2 ]("(@*R D7U!/
M4U1;)V=A;64Q)UT@*R B/$)2/B([('T-"@D-"B\O(" D=F%R7V9R;4=A;64@
M/2 B1V%M92(@*R D1V%M94ED>#L-"B\O(" D9G)M1V%M92 ]("0D=F%R7V9R
M;4=A;64[(" @+R\@5&AE("(D)"(@:7,@=7-E9"!F;W(@=F%R:6%B;&4@=F%R
M:6%B;&5S#0HO+R @:68@*"1F<FU'86UE*2![#0H)#0IF;W(@*"1'86UE261X
M(#T@,3L@)$=A;65)9'@@/#T@,3<[("1'86UE261X*RLI('L-"@DO*B!I;G-T
M96%D(")H87)D8V]D:6YG(&5A8V@@<F%D:6\@8G5T=&]N(&YA;64@+2!J=7-T
M(&1O(&ET('!R;V=R86UM871I8V%L;'D@8GD@8V]N8V%T96YA=&EN9R O(&-R
M96%T:6YG('1H92!N86UE("HO#0H))'9A<E]F<FU'86UE(#T@(D=A;64B("L@
M)$=A;65)9'@[#0H))&9R;4=A;64@/2 D)'9A<E]F<FU'86UE.R @("\O(%1H
M92 B)"0B(&ES('5S960@9F]R('9A<FEA8FQE('9A<FEA8FQE<PT*"21,96YG
M=&@@/2!S=')L96XH)&9R;4=A;64I.PT*"7!R:6YT("),3T]0("1'86UE261X
M(#T@)&9R;4=A;64@+2 D=F%R7V9R;4=A;64@+2!L96YG=&@@;V8@9G)M1V%M
M93T@)$QE;F=T:" \0E(^(CL-"@T*+R\))&9R;4=A;64@/2 B9V%M921'86UE
M261X(CL-"@EI9B H)%]03U-46R=F<FU'86UE)UTI('L-"@D)+RH@52!W86YT
M('1O(&-H96-K(&EF('1H92!L96YG=&@@:7,@-2!O<B V(&)Y=&5S(&)E8V%U
M<V4@:70@8V]U;&0@8F4@(F=A;64Q(B!O<B B9V%M93$T(B J+PT*"0DD3&5N
M9W1H(#T@<W1R;&5N*"1F<FU'86UE*3L-"@D):68@*"1,96YG=&@@/3T@-2D@
M>PT*"0D))$=E=$YU;6)E<B ](#$[( T*"0E]#0H)"65L<V4@>PT*"0D))$=E
M=$YU;6)E<B ](#([( T*"0E]#0H)#0H)"21'86UE240@/2!I;G1V86PH<W5B
M<W1R*"1F<FU'86UE+" D3&5N9W1H("T@)$=E=$YU;6)E<BP@)$=E=$YU;6)E
M<BDI.PT*"0EP<FEN=" B1V%M92 M+2T^("1'86UE261X("T@)&9R;4=A;64@
M+2 D1V5T3G5M8F5R("T@)$=A;65)1" \0E(^(CL-"B @( EI9B H)$=A;65)
M1" ]/2 D1V%M94ED>"D@>PT*"0D)<')I;G0@(EEE86@@36%T8V@@+2 D1V%M
M94E$(#T@)$=A;65)9'@@/$)2/B([#0H)"0DO*B!/2RP@:&5R92!I<R!W:&5R
M92!5('=A;G0@=&\@9&\@=&AE(&%C='5A;"!I;G-E<G0@*B\-"@D)?0T*"7T@
M+RH@)&9R;4=A;64@96YD:68@*B\-"GT-"@T*/SX-"CPO8F]D>3X-"CPO:'1M
";#X`
`
end


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to