Page marking

Asked

Viewed 26 times

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.

inserir a descrição da imagem aqui

<?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.

  • Where does the title ID come from?

  • The id of the title still n put, because did not know how to insert it. but it would be idtitulo.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.