I am creating a system and wanted to know how to make a form per step, it works by checkbox and input and type just wanted to know how to pass the data from the first form to the two to be inserted into mysql.
</tr>
<tr>
<td width="280" bgcolor="#00BFFF">Refeição</td>
<td width="70" bgcolor="#00BFFF">Quantidade</td>
</tr>
<tr>
<td width="280"><input type="checkbox" name="pedido_refeicao[]" value="Costela de Tambaqui sem Espinha">Costela de Tambaqui sem Espinha</td>
<td width="20"><input type="text" name="num_refeicao[]" size="7"></td>
</tr>
<tr>
<td width="280"><input type="checkbox" name="pedido_refeicao[]" value="Lombo de Tambaqui Frito sem Espinha">Lombo de Tambaqui Frito sem Espinha</td>
<td width="20"><input type="text" name="num_refeicao[]" size="7"></td>
</tr>
<tr>
<td width="280"><input type="checkbox" name="pedido_refeicao[]" value="Caldeirada de Tambaqui sem Espinha">Caldeirada de Tambaqui sem Espinha</td>
<td width="20"><input type="text" name="num_refeicao[]" size="7"></td>
</table>
<br>
<input class="btn" type="submit" value="Proximo" name="Proximo">
</form>
And on page two of the form is the bottom one but in the first step of the form work with checkbox and how will I select several of them I will have to use the implode to get all the checkboxes and input how could I do? Thanks in advance
if($_POST)
{
$numero_mesa = $_POST['numero_mesa'];
$pedido_refeicao = implode(', ', $_POST['pedido_refeicao']);
$num_refeicao = implode(', ', $_POST['num_refeicao']);
}
<?php
session_start();
$nome = isset($_POST['nome']) ? $_POST['nome'] : '';
$_SESSION['nome'] = $nome;
$email = isset($_POST['email']) ? $_POST['email'] : '';
$_SESSION['email'] = $email;
$telefone = isset($_POST['telefone']) ? $_POST['telefone'] : '';
$_SESSION['telefone'] = $telefone;
?>