Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1.  
  2. <html>
  3. <body>
  4. <?php
  5. $con = mysql_connect("localhost","root","");
  6. if (!$con)
  7. {
  8. die('Could not connect: ' . mysql_error());
  9. }
  10.  
  11. mysql_select_db("hc", $con);
  12. $result = mysql_query("SELECT * FROM hc");
  13. ?>
  14.  
  15. <form method="post" action="pag3.php">
  16. <input id="saveForm" class="button_text" type="submit" name="submit" value="Create new registration" />
  17. </form>
  18.  
  19. <table >
  20. <tr>
  21. <td>Edit</td>
  22. <td>Nume</td>
  23. <td>Prenume</td>
  24. <td>CNP</td>
  25. <td>Ocupatie</td>
  26. <td>Telefon</td>
  27. </tr>
  28.  
  29. <?php
  30. while($row = mysql_fetch_array($result))
  31. {
  32. echo "<tr> <td> <a href='pag2.php?index=".$row['ID']."' >edit</a> </td>";
  33. echo " <td>".$row['Nume']."</td> <td>".$row['Prenume']." </td> <td> ".$row['CNP']," </td> <td>".$row['Ocupatie'] ."</td> <td>". $row['Telefon']." </td> </tr>";
  34. echo "<br />";
  35. }
  36. //
  37. ?>
  38.  
  39. </table>
  40.  
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement