Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <?php $yhteys = mysql_connect('palvelin', 'tietokanta', 'salasana')
  2.   or die("Kantaan ei saatu yhteyttä: ".mysql_error());
  3. mysql_select_db('kanta', $yhteys)
  4.   or die("Kantaa ei saatu valittua: ".mysql_error());
  5. $tulos = mysql_query("SELECT * FROM perustiedot WHERE heppa_id LIKE '1'", $yhteys)
  6.   or die("Kysely ei onnistunut: ". mysql_error());?>
  7.  
  8. <h1><?php while($tieto = mysql_fetch_array($tulos)){
  9.   echo $tieto['nimi'];};?>
  10. </h1>
  11.   <table id="listaus">
  12. <tr>
  13.     <td class="tieto">Rotu, sukupuoli</td><td><?php echo $tieto['rotu'];?> </td>
  14.         <td class="tieto">Säkäkorkeus</td><td> <?php echo $tieto['sakakorkeus'];;?> </td>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement