I have 7 submit buttons on a form. Being:
Four of that:
<input type="submit" id="chamado1" class="mr-abre-btn" value="Abrir chamado">
Two of these:
<input type="submit" id="chamado2" class="mr-abre-btn" value="Encaminhar chamado">
And one of these:
<input type="submit" id="chamado3" class="mr-encerra-btn" value="Encerra chamado">
The problem is that I am trying to make a switch case or an if in value of a input hidden
that I have. I'm doing it this way:
<input type="hidden" name="situacao_id" value="
<?php
$situacao_chamado = $_POST['id'];
switch ($situacao_chamado) {
case 'chamado1':
echo "1";
break;
case 'chamado2':
echo "3";
break;
case 'chamado3':
echo "3";
break;
}
?>"
However, when I search for this variable:
$situacao_chamado = $_POST['id'];
It ends up generating the error below:
Notice: Undefined index: id in C:\wamp64\www\form\formulario.php on line 167 Call Stack #TimeMemoryFunctionLocation 10.0010242264{main}( )...\formulari.php:0 20.0111307088include( 'C:\wamp64\www\form\formulario.php' )...\formulario.php:44 ">