Nerviie

Default

May 27th, 2019
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.35 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Reis</title>
  5.     <meta charset="utf-8">
  6.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  7.     <style type="text/css">
  8.         body{
  9.             background-color: white;
  10.             font-family:
  11.         }
  12.         #nav{
  13.             opacity: .8;
  14.             padding-top: 50px;
  15.         }
  16.         #nav:hover {
  17.             opacity: 1.0;
  18.         }
  19.     </style>
  20. </head>
  21. <body>
  22.     <?php
  23.        
  24.         $bd_host="localhost";
  25.         $bd_user="root";
  26.         $bd_password="";
  27.         $bd_database="website";
  28.  
  29.  
  30.         $ms = new mysqli($bd_host,$bd_user,$bd_password,$bd_database);
  31.  
  32.         $ms->set_charset("utf8");
  33.  
  34.         $id1=$conteudo=$titulo="";
  35.         $id=1;
  36.  
  37.         $existe=false;
  38.  
  39.         $sql = "SELECT * FROM backoffice WHERE idconteudo=?";
  40.         $statement = $ms->prepare($sql);
  41.         $statement->bind_param('i',$id);
  42.         $statement->execute();
  43.         $statement->bind_result($id1, $conteudo, $titulo);
  44.         if ($statement->fetch()) {
  45.                 $existe=true;
  46.         }
  47.         else
  48.             $existe=false;
  49.             $statement->close();
  50.         echo "$conteudo";
  51.     ?>
  52.    
  53. </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment