Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <?php
  2.     $title = "Pocetna strana";
  3.     require_once("datafunctions.php");
  4.     head($title);
  5.  
  6. if(isset)
  7.  
  8. ?>
  9.     <a href="?izbor1">Uloguj se</a><br/><br/>
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  $link = mysqli_connect("localhost", "root" "", "nrt_73_12_sep2014");
  16.     if(!$link)
  17.         die("Neuspesna konekcija na bazu!");
  18.     $sql = "SELECT 'naslov' FROM 'oglasi'";
  19.     $result = mysli_query($link, $sql);
  20.     if(!$result) || mysqli_num_rows($result) == 0)
  21.     {
  22.       echo "Upite nije dobar"
  23.     }
  24.     else
  25.     {
  26.     echo"<b>Spisak postavljenih oglasa</b>)";
  27.         while (rows = mysqli_fetch_array($result) != false)
  28.         {
  29.             echo $rows[0] . "<br/>"
  30.         }
  31.     }
  32.  
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement