SHARE
TWEET

Untitled

a guest May 19th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?
  2. $db['table'] = "versioni";
  3.  
  4. if (!(IsSet($_GET['titolo'])) || !(IsSet($_GET['autore'])))
  5. {
  6.     echo "
  7.   <form action=\"".$url['site']."?page=versioni\" method=\"GET\" />
  8.   <input  type=\"hidden\" value=\"versioni\" name=\"page\" />
  9.   <input type=\"text\" name=\"titolo\" />
  10.   <input type=\"text\" name=\"autore\" />
  11.   <input type=\"submit\" />";
  12. }
  13. else
  14. {
  15.    $query = mysql_query("SELECT * FROM ".$db['table']." WHERE name = '".$_GET['titolo']."' OR author = '".$_GET['autore']."'") or die ("Query fallita: ".mysql_error());
  16.    $row = mysql_num_rows($query);
  17.    if($row == 0)
  18.    {
  19.        echo "non trovo la versione";
  20.    }
  21.    else
  22.    {
  23.         $row = mysql_fetch_assoc($query);
  24.         $versione = $row['versione'];
  25.         echo $versione;
  26.    }
  27. }
  28. ?>
RAW Paste Data
Top