I have a code that receives data via $_POST
of a form as follows:
...
$certificate = $_POST['certificate'];
...
If you make a print_r($certificate)
, the result is as follows:
Array (
['cliente'] => White Martins Gases Industriais Ltda
['entrega'] => 2017-04-11
['utilizacao'] => Oxigênio
['norma'] => White Martins - PR029
)
The fields in the form are as follows:
<select type="select" class="form-control" name="certificate['cliente']" id="cliente">
<input type="date" class="form-control" name="certificate['entrega']" id="entrega">
<select type="select" class="form-control" name="certificate['utilizacao']" id="utilizacao">
<select type="select" class="form-control" name="certificate['norma']" id="norma">
How to assign the values of this array to 4 separate variables, type:
$cliente = ????;
$entrega = ????;
$utilizacao = ????;
$norma = ????;
I'm not sure how to access the array.