Page 344 - MDP2022-2
P. 344

<?php
                    include_once("connection.php");
                    $food_name  =  $_POST['bookmark_name'];
                    $state  =  $_POST['bookmark_state'];

                    if($state=="on"){
                            $sql  =  "update  bookmark  set  bookmark  =  false  where  name  =  '$food_name'";
                    }
                    else  if($state=="off"){
                            $sql  =  "update  bookmark  set  bookmark  =  true  where  name  =  '$food_name'";
                    }


                    $result  =  mysqli_query($connect,  $sql);

                    echo("<script>location.href='bookmark.php';</script>");
            ?>


            [  즐겨찾기  메뉴  페이지  ]
            <!DOCTYPE  html>
            <html    >
            <head>
                                                    .
                                                    .

                                                    .
            </head>
            <body>
                                                    .
                                                    .
                                                    .

            <section  data-bs-version="5.1"  class="team2  cid-tgIpToZslP"  xmlns="http://www.w3.org/1999/html"
            id="team2-e">
                    <div  class="container">
                    <?php
                                    include_once("connection.php");


                                    $sql  =  "SELECT  *  FROM  bookmark";


                                    $result  =  mysqli_query($connect,  $sql);


                                    if  ($result  ===  false)  {
                                            echo  '저장하는  과정에서  문제가  생겼습니다.  관리자에게  문의해주세요';
                                            error_log(mysqli_error($conn));
                                    }  else  if  (isset($result)  &&  $result->num_rows  >  0)  {
                                            while  ($row  =  mysqli_fetch_array($result))  {
                                                    if($row['bookmark']==1){
                                                            echo  '<div  class="card">
                                                                    <div  class="card-wrapper">
                                                                            <div  class="row  align-items-center">
   339   340   341   342   343   344   345   346   347   348   349