Advertisement
Guest User

sayfa.php

a guest
Jul 30th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.08 KB | None | 0 0
  1. <?php
  2. session_start();
  3. ob_start ();
  4. if(!isset($_SESSION["kullanici"])){
  5. header("location:/index.php");
  6. }else{
  7. include ("baglan.php");
  8. }
  9. ?>
  10. <html>
  11. <head>
  12.  
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  14. <title>sayfa.php</title>
  15.  
  16. </head>
  17.  
  18. <body>
  19. <?php
  20. $sorgu=mysql_query ("SELECT * FROM sayfalar ORDER BY id DESC");
  21.  
  22. echo "<form id=\"sayfa\" name=\"sayfa\" method=\"post\" action=\"kayit.php\">
  23. <table align=\"center\" width=\"250\" cellspacing=\"1\" cellpadding=\"1\" border=\"1\" bordercolor=\"pink\">
  24.  
  25.    <tr>
  26.      <td>SAYFA ADI</td>
  27.      <td>İŞLEM</td>
  28.    </tr>
  29.    
  30.     <tr>
  31.      <td><input type=\"text\" name=\"baslik\" /></td>
  32.      <td><input name=\"sayfa_ekle\" type=\"submit\" id=\"ekle\" value=\"ekle\" /></td>
  33.    </tr>";
  34.    
  35. while ($verigetir=mysql_fetch_array ($sorgu)) {
  36. $id=$verigetir['id'];
  37. $baslik=$verigetir['baslik'];
  38.  
  39. echo "    <tr>
  40.             <td>$baslik</td>
  41.             <td><a href=\"kayit.php?action=sil&id=".$id."\">SİL</a></td>
  42.         </tr>";
  43.    
  44.    
  45. }
  46.   echo"</table>
  47.         </form>";
  48.  
  49. ?>
  50. </body>
  51. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement