0
I am trying to create a bookmarking field book page, but I am not able to relate tables. I created 3 tables User, Title and Pages. I even managed to relate to the user with cookie, but I’m not able to think of a way to relate the title id.
<?php
$login_cookie = $_COOKIE['login'];
if (!isset($login_cookie)) {
header("Location: index.php");
}
$con = mysqli_connect('localhost', 'root', '', 'lista');
$paginas = $_POST["paginas"];
$ins = "INSERT INTO paginas (paginas, usuario) VALUES ('".$paginas."','".$login_cookie."')";
if(mysqli_query($con, $ins)) {
echo "Registrado com sucesso!";
} else {
echo "Erro ao registrar!";
}
mysqli_close($con);
?>
?>
I don’t think it’s worth putting it all away.
– Francisco
Where does the title ID come from?
– Sam
The id of the title still n put, because did not know how to insert it. but it would be idtitulo.
– OliverDamon