Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Getting the result from a form
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

Report this thread to moderator Post Follow-up to this message
Old Post
G.Delafond
11-24-04 09:00 PM


Re: Getting the result from a form
G.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

Report this thread to moderator Post Follow-up to this message
Old Post
J.O. Aho
11-24-04 09:00 PM


Re: Getting the result from a form
J.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

Report this thread to moderator Post Follow-up to this message
Old Post
G.Delafond
11-25-04 01:56 AM


Re: Getting the result from a form
G.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>


Report this thread to moderator Post Follow-up to this message
Old Post
J.O. Aho
11-25-04 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP SQL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:44 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.