I'm trying to create a bookmarked field, but I'm not sure how to relate tables. I created 3 User, Title and Pages tables. I even managed to relate to the user with cookie , but I can not 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);
?>
?>