0
I am unable to save the ID of the address in the bank, I select the address but I can’t
<?php
session_start();
$host = "localhost";
$user = "root";
$senha = "";
$banco = "cafeteriasp";
$conexao = mysqli_connect ($host, $user, $senha) or die (mysql_error());
mysqli_select_db($conexao, $banco) or die (mysql_error());
$end = mysqli_query ($conexao, "select ENDID FROM enderecos order by ENDID desc limit 1") or die(mysqli_error());
$id = $_SESSION['id'];
$numero = $_POST['numero'];
$complemento = $_POST['complemento'];
$insert = mysqli_query($conexao, "INSERT INTO end_usu(END_USU, END_ID, END_NUMERO, END_COMPLEMENTO)
VALUES ('$id', '$end', '$numero', '$complemento')");
mysqli_close($conexao);
?>
Do you have a problem with the answer?
– rray