Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1.  <html>
  2.  <head>
  3.  <title>Музыкальные композиции</title>
  4.  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5.  </head>
  6.  <body>
  7.  <table>
  8.  <tr>
  9.  <td>
  10.  <a href="index.php?form=compositions">Композиции</a><br/>
  11.  <a href="index.php?form=adding">Добавление</a><br/>
  12.  <a href="index.php?form=search">Поиск</a><br/>
  13.  <a href="index.php?form=statistic">Статистика</a><br/>
  14.  <a href="index.php?form=info">Информация</a><br/><br/>
  15.  
  16.  </td>
  17.  <td>
  18.  <?
  19.  $hostname = "localhost";
  20.  $username = "root";
  21.  $password = "mynewpassword";
  22.  $dbName = "music";
  23.  $userstable = "composition";
  24.  
  25.  /*$query = "INSERT INTO `bd3`.`lang` (`id`, `name`, `shortName`) VALUES ('1', 'йцу', 'фыв');";
  26. $res = mysql_query($query) or die(mysql_error()); */
  27.  
  28.  mysql_connect($hostname,$username,$password) OR DIE("Не могу создать соединение ");
  29.  
  30.  mysql_select_db($dbName);
  31.  
  32.  switch ($_GET['form']) {
  33.      case "compositions":
  34.          include("compositions.php");
  35.          break;
  36.  
  37.      default:
  38.          include("compositions.php");
  39.          break;
  40.  }
  41.  
  42.  ?>
  43.  </td>
  44.  </tr>
  45.  </table>
  46.  </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement