1
I got the following form
that sends an array:
Form:
<form id="form-simulacao" action="controller.php">
<div class="col-md-3">
<div class="form-field">
<div class="form-group">
<label>Nº do Fixo:</label>
<input class="form-control" type="text" name="fixo['numero']">
</div>
<div class="form-group">
<label>Gasto Atual:</label>
<input class="form-control" type="text" name="fixo['g_atual_fixo']">
</div>
<div class="form-group">
<label>Quanto gostaria de gastar:</label>
<input class="form-control" type="text" name="fixo['deseja_fixo']">
</div>
</div>
</div>
<button class="btn btn-default">envia</button>
</form>
Array ( [fixo] => Array ( ['numero'] => xxxxx ['g_atual_fixo'] => yyyy ['deseja_fixo'] => 2 ) )
I need to take the field: deseja_fixo
then I do this in mine php
:
$val = $_REQUEST['fixo']['deseja_fixo']; echo $val;
only then it doesn’t print anything on my screen and when I do var_dump($val),
have NULL
in response.
array(1) { ["fixed"]=> array(3) { [""'numero'"]=> string(5) "xxxxx" ["'g_actual_fixed'"]=> string(4) "yyyy" ["'wish fixed'"]=> string(1) "2" } }
– Henrique Silva
enter the code of your shipping form, help in understanding the problem!
– wwwjsw
@Henriquesilva makes a test like $val = (string)$_REQUEST['fixed']['fixed wish'];
– Fabiano Cacin Pinel
return
NULL
– Henrique Silva
Thanks for the personal tips I got
– Henrique Silva