form name value not carrying over.

I have a multi-page form that is passing form input from one to the other.  Form 1 must have decimals as part of a javascript calculation for the name but I am noticing that the values are not carrying over to the detination page.  When I remove the decimal it works.  Unfortunately, I have to have them in there.  How do I work around this?  here is an example of the problem.

Form 1:  <select name="test1.00"><option value="3">test</option></select>

Form 2:  <input type="text" name="test1.00" value="<?php echo((isset($_POST["test1.00"]))?$_POST["test1.00"]:"") ?>" />

Form 2 text field is blank.

Thanks in advance!
pda4meAsked:
Who is Participating?
 
ljubiccicaConnect With a Mentor Commented:
I don't know why, but php changes name to test1_00

So you need to change your Form 2 to:

<input type="text" name="test1.00" value="<?php echo((isset($_POST["test1_00"]))?$_POST["test1_00"]:"") ?>" />

Greets
Ljubiccica
0
 
HackneyCabCommented:
I don't think that the period is a valid character in a form field identifier.

Could you change the decimal point to a hyphen, so you have test1-00, and then use Javascript to modify that into a decimalised value for your calculation?
0
 
pda4meAuthor Commented:
Thanks ljubiccica, that worked like a charm!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.