This should be a very basic question in PHP, but I couldn't get a nice solution in web. Please some experts show me with example.
I am trying to read value of 3 textboxes, those names are input_38.1, input_38.2, input_38.3
so my code is echo $_POST['input_38.1']. But it doesn't print the 1st textbox's value. What is the way to get all three textbox's values.
Thanks in advance.
I am trying to read value of 3 textboxes, those names are input_38.1, input_38.2, input_38.3
From the PHP Manual:
Dots and spaces in variable names are converted to underscores. For example
<input name="a.b" />
becomes$_REQUEST["a_b"]
.
So, you'd need to write:
echo $_POST['input_38_1'];
To avoid confusion, it's a good idea not to use dots in your form's name attributes.
You need to change your echo statement:
$_POST['input_38_1'];
I usually stay away from using dots in my variable names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With