RE: [PHP] Form Problem
| From: | Martin Towell | Date: | Thu, 24 Jan 2002 02:58:43 +0000 |
| Subject: | RE: [PHP] Form Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81813@lists.php.net to get a copy of this message | ||
somewhere in the form put:
<input type=\"hidden\" name=\"Dno\" value=\"$Dno\">
-----Original Message-----
From: Michael P. Carel [mailto:mikecarel@teamglac.com]
Sent: Thursday, January 24, 2002 1:48 PM
To: php
Subject: [PHP] Form Problem
Hi there,
I have a problem here regarding the form table name variable (i.e <input
name=Process type text>), when i used Href tags to send the variable in the
next script it does'nt recognized the $Process variable. I've tried the the
submit type but but im having problem with other $variable in the table
which is not part of the form.
Here's the script:
Option1: Using Submit
?><FORM ACTION="addlist.php" method="get"><?
print("<BR>");
print("<TABLE WIDTH= 90%>");
print("</TABLE><HR WIDTH= 90%><BR>");
print("<table><TR><TD ALIGN=RIGHT bgcolor=gray><B>8D #:
</TD><TD $Dno
</TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>MODE OF FAILURE:
</TD><TD><TEXTAREA
NAME=Mode ROWS= 5 COLS=40 WRAP></TEXTAREA></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>PACKAGE:</TD><TD><input
name=Package
type=text></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>PROCESS:</TD><TD><input
name=Process
type=text></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>ROOT CAUSE:</TD><TD><TEXTAREA
NAME=Root
ROWS=5 COLS=40 WRAP></TEXTAREA></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>CORRECTIVE
ACTION:</TD><TD><TEXTAREA
NAME=Corrective ROWS=5 COLS=40 WRAP></TEXTAREA></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>RESPONDENCE:</TD><TD><input
name=Respondence type=text></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>COMMITMENT:</TD><TD><input
name=Commitment type=text></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>STATUS:</TD><TD><TEXTAREA
NAME=Status
ROWS=5 COLS=40 WRAP></TEXTAREA></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>REMARKS:</TD><TD><TEXTAREA
NAME=Remarks
ROWS=5 COLS=40 WRAP></TEXTAREA></TD></TR>
</table>");
?><center><input type = "submit" name= "submit"
value="UPDATE"><?
Im having problem with the $Dno. Submit would not recognize this in sending
the form. I'd like submit to add a &Dno=$Dno in submitting the form but how?
Option 2: Using HREF
print("<BR>");
print("<TABLE WIDTH= 90%>");
print("</TABLE><HR WIDTH= 90%><BR>");
print("<table><TR><TD ALIGN=RIGHT bgcolor=gray><B>8D #:
</TD>$Dno</TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>MODE OF FAILURE:
</TD><TD><TEXTAREA
NAME=Mode ROWS= 5 COLS=40 WRAP></TEXTAREA></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>PACKAGE:</TD><TD><input
name=Package
type=text></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>PROCESS:</TD><TD><input
name=Process
type=text></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>ROOT CAUSE:</TD><TD><TEXTAREA
NAME=Root
ROWS=5 COLS=40 WRAP></TEXTAREA></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>CORRECTIVE
ACTION:</TD><TD><TEXTAREA
NAME=Corrective ROWS=5 COLS=40 WRAP></TEXTAREA></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>RESPONDENCE:</TD><TD><input
name=Respondence type=text></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>COMMITMENT:</TD><TD><input
name=Commitment type=text></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>STATUS:</TD><TD><TEXTAREA
NAME=Status
ROWS=5 COLS=40 WRAP></TEXTAREA></TD></TR>
<TR><TD ALIGN=RIGHT bgcolor=gray><B>REMARKS:</TD><TD><TEXTAREA
NAME=Remarks
ROWS=5 COLS=40 WRAP></TEXTAREA></TD></TR>
</table>");
print("<A
HREF=completelist.php?action=Update&Dno=$Dno&Mode=$Mode&Package=$Package&Pro
cess=$Process&Root=$Root&Corrective=$Corrective&Respondence=$Respondence&Com
mitment=$Commitment&Status=$Status&Remarks=$Remarks>[UPDATE]</A>");
Im having problem here in all the name string variable(ie. $Package, $Mode
...etc) except the $Dno. How could i make the Href tag recognize the name
string variable in the table form?
Any idea? Please help me regarding this im just a PHP newbie.
Thanks in advance
Regards,
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net