RE: [PHP] Problem w/ Hidden Input Fields
| From: | Kim Madsen | Date: | Tue, 11 Oct 2005 08:10:41 +0000 |
| Subject: | RE: [PHP] Problem w/ Hidden Input Fields | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-223883@lists.php.net to get a copy of this message | ||
Hello
> -----Original Message-----
> From: Jason Ferguson [mailto:fergusonjason@gmail.com]
> Sent: Sunday, October 09, 2005 5:55 PM
> To: php-general@lists.php.net
> Subject: [PHP] Problem w/ Hidden Input Fields
>
> I have a <input type="hidden"> field with a value 86 characters long.
> Here is the entire form:
>
> <form name="frmWizard" id="frmWizard" method="post"
> action="">
> <table>
> <tr>
>
> <td><input
> type="radio" name="radioKey" value="2"
> checked="checked" />Rootsweb
> <input
> type="hidden" name="txtKeyValue" id="txtKeyValue"
> maxlength="90"
> value="ABQIAAAAh2cCTTmAE6T4OXjecIFe5BQMxb4e6BwgeSB7cBu9SbVQSak6ARTgAPoctbx
> 36BXXgbYZONZls0B1LQ"
> />
> </td>
> </tr>
> <tr>
> <td><input
> type="radio" name="radioKey" value="2" />Other Site:
> <input type="text" name="txtKeyValue" id="txtKeyOther"
> /></td>
> </tr>
> <tr>
> <td class="center">
>
> <input
> type="button" name="btnGenTemplate" id="btnGenTemplate"
> value="Generate HTML" onclick="setWizardAction('genHTML.php')"
> />
> </td>
> <tr>
> <td class="center">
> <input
> type="button" name="btnPrev" id="btnPrev" value="<--
> Prev" disabled="true" />
> <input
> type="button" name="btnNext" id="btnNext" value="Next
> -->" onclick="setWizardAction('mmwizard1.php')"/>
> <input
> type="button" name="btnFinish" id="btnFinish" value ="
> Finish" />
> </td>
> </tr>
>
> </table>
> </form>
>
> However, when I submit and do a print_r($_POST), there is no value for
> $_POST['txtKeyValue'].
Because You later in the form set:
<input type="text" name="txtKeyValue" id="txtKeyOther" />
It´s overwritten then.
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper
ComX Networks A/S
Naverland 31, 2
DK-2600 Glostrup
Denmark
Phone: +45 70 25 74 74
direct: +45 32 87 73 93
Fax: +45 70 25 73 74
Web: www.comx.dk
E-mail: km@comx.dk