Code Comments
Programming Forum and web based access to our favorite programming groups.Hi all ! I am new in php programming, and I am in trouble with getting the result of a form back The first line is : echo "<TD><input $checkbox type=\"checkbox\" name=\"c[]\" value=\"" $ligne['ID']."\"></TD>\n"; This one works, and I get $checkbox back. Then, I have some lines like these : <TD><?php print ($ligne["nom"]) ?></td> <td><input NAME="horaire" type="text" VALUE="<?php print ($ligne["horaires"]) ?>"></TD> <td><input NAME="resultat" type="text" VALUE="<?php print ($ligne ["resultat"]) ?>" ></TD> or echo "<TD>".$ligne["nom"]."</td> <td><input name=\"horaire\" type=\"text\" VALUE=\"".$ligne ["horairesgarde"]."\"></TD> <td><input name=\"resultat\" type=\"text\" VALUE=\"".$ligne ["resultat"]."\"></TD> In any case, I cannot get neither $horaire nor $resultat back. They are always empty. I tried many combinations of " , \", ', etc. What do I do wrong ?? Many thanks Gerard -- G.Delafond http://www.delafond.org
Post Follow-up to this messageG.Delafond wrote: > Hi all ! > > I am new in php programming, and I am in trouble with getting the result o f > a form back > > The first line is : > > echo "<TD><input $checkbox type=\"checkbox\" name=\"c[]\" value=\"" > $ligne['ID']."\"></TD>\n"; > > This one works, and I get $checkbox back. > > Then, I have some lines like these : > > <TD><?php print ($ligne["nom"]) ?></td> > <td><input NAME="horaire" type="text" VALUE="<?php print > ($ligne["horaires"]) ?>"></TD> > <td><input NAME="resultat" type="text" VALUE="<?php print ($ligne > ["resultat"]) ?>" ></TD> > > or > > echo > "<TD>".$ligne["nom"]."</td> > <td><input name=\"horaire\" type=\"text\" VALUE=\"".$ligne > ["horairesgarde"]."\"></TD> > <td><input name=\"resultat\" type=\"text\" VALUE=\"".$ligne > ["resultat"]."\"></TD> > > In any case, I cannot get neither $horaire nor $resultat back. They are > always empty. > > I tried many combinations of " , \", ', etc. > > What do I do wrong ?? I do prefera to use pure HTML as far as possible, and it's a bit faster than let PHP to echo out everything ?> <td><?PHP echo $ligne['nom']; ?></td> <td><input name="horaire" type="text" value="<?PHP echo $ligne['horairesgarde']; ?>"></td> <?PHP As you see, it's a lot easier to follow too. In your case I think your problem lies in how you transfeared the values int o $ligne from your $_REQUEST. //Aho
Post Follow-up to this messageJ.O. Aho wrote: > I do prefera to use pure HTML as far as possible, and it's a bit faster > than let PHP to echo out everything OK. I'll try to do this. > > ?> > <td><?PHP echo $ligne['nom']; ?></td> > <td><input name="horaire" type="text" > value="<?PHP echo $ligne['horairesgarde']; ?>"></td> > <?PHP I tried this code, but no better result. > > As you see, it's a lot easier to follow too. > > In your case I think your problem lies in how you transfeared the values > into $ligne from your $_REQUEST. This sentence is very cryptic for me. I tried with no VALUE at all, and I still cannot get my $horaire. It's very kind to you to try to help me. > > Gerard -- G.Delafond http://www.delafond.org
Post Follow-up to this messageG.Delafond wrote: > > This sentence is very cryptic for me. > > I tried with no VALUE at all, and I still cannot get my $horaire. > <td><?PHP echo $ligne['nom']; ?></td> <td><input name="horaire" type="text" value="<?PHP echo $_REQUEST['horaire']; ?>"></td>
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.