Php ile ilk site düzenleme denemesi .. .

mgncrslnMGençarslan

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style type="text/css">

#ana {

width: 780px;

background-color: #efebe8;

}

#ana #duyuru {

background-color: #FFF;

padding-top:25px;

padding-bottom:25px;

}

#ana #duyuru #duyuru_alani {

margin-left: 40px;

font-family: Arial, "Times New Roman", Times, serif;

font-size:1em;

color: #333;

line-height: 25px;

margin-right: 40px;

text-align: justify;

margin-top: 2px;

padding-top:20px;

padding-bottom:20px;

border: 1px solid #e9e9e9;

background-image: url(images/cizgi.PNG);

background-repeat: repeat-y;

}

.yazi_baslik {

margin-left: 40px;

height: 30px;

font-family: Arial, "Times New Roman", Times, serif;

font-size:1.2em;

color: #333;

margin-right: 40px;

border-bottom-width: thin;

border-bottom-style: solid;

border-bottom-color: #b9b7b4;

}

.menu_baslik {

margin-left: 20px;

height: 40px;

font-family: Arial, "Times New Roman", Times, serif;

font-size:1em;

color: #666;

line-height: 30px;

margin-right: 20px;

border-bottom-width: thin;

border-bottom-style: solid;

border-bottom-color: #b9b7b4;

}

.bas{

height: 40px;

width: 550px;

font-family: Arial, "Times New Roman", Times, serif;

font-size:1em;

line-height: 30px;

text-align: center;

border: 1px solid #CCC;

background-color: #F0F0F0;

margin-top: 10px;

margin-left:40px;

}

.bas2{

width: 550px;

font-family: Arial, "Times New Roman", Times, serif;

font-size:1em;

line-height: 30px;

text-align: left;

border: 1px solid #CCC;

background-color: #F0F0F0;

margin-top: 10px;

margin-left:40px;

}

body {

margin-left: 0px;

margin-top: 0px;

}

.tablo {

font-size:1em;

margin-top:5px;

}

.tablo td{

padding-top: 4px;

padding-right: 4px;

padding-bottom: 4px;

padding-left: 10px;

border: 1px solid #CCC;

}

.tablo a{

display:block;

text-decoration:none;

color:#333;

}

.tablo a:hover{

color: #F00;

}

</style>

</head>

<body>

<?php

@$sayfasay = mysql_real_escape_string($_GET["sayfasay"]);

if (empty($sayfasay) || !is_numeric($sayfasay)){$sayfasay=1;}

@$kacar = 4;

@$ksayisi = mysql_num_rows(mysql_query("SELECT * FROM ziyaretci"));

@$ssayisi = ceil($ksayisi/$kacar);

@$nereden = ($sayfasay*$kacar)-$kacar;

@$sorgu=mysql_query("SELECT * FROM ziyaretci ORDER BY ziyaretciid DESC limit $nereden,$kacar");

?>

<div id="ana">

  <div id="duyuru">

       <div class="yazi_baslik">Ziyaretçi Defteri</div>

       <div id="duyuru_alani">

       <?php

        while (@$getir=mysql_fetch_assoc($sorgu))

{

?>

         <table class="tablo" width="550" border="0" style="margin-left:40px; font-size:1em">

           <tbody>

             <tr style="background:#F2F2F2">

               <td width="140"><strong><?php echo $getir["adsoyad"];?></strong></td>

               <td width="57" align="right"><?php echo date("d.m.Y",strtotime($getir["tarih"]));?></td>

             </tr>

             <tr>

               <td colspan="2"><?php echo $getir["yorum"];?></td>

             </tr>

           </tbody>

         </table>

         <?php } ?>

         <?php 

 if ($ssayisi!=1)

 { ?>

       <div class="bas">

       <?php

  for ($j=1; $j<=$ssayisi; $j++) {

echo "<a href=index.php?p=ziyaretci&sayfasay=$j>$j</a>";

if ($j!=$ssayisi) echo "<font color=#060  size=2> &nbsp;|&nbsp; </font>";

}?>

</div>

<?php

 }

?>

    <div class="bas2">

    <form action="yorumkaydet.php" method="post" enctype="multipart/form-data">

    <table width="100%" border="0">

  <tr>

    <td>Adınız ve Soyadınız</td>

  </tr>

  <tr>

    <td><input name="adsoyad" type="text" id="adsoyad" size="50"  style="height:25px;"/></td>

  </tr>

  <tr>

    <td>Görüş ve İstekleriniz</td>

  </tr>

  <tr>

    <td><textarea name="yorum" id="yorum" cols="47" rows="5"></textarea></td>

  </tr>

  <tr>

    <td><input type="submit" name="gonder" id="gonder" value="Gönder" /></td>

  </tr>

</table>

</form>

    </div>

    </div>

  </div>

</div>

</body>

</html>







en üstte cıkan kod satırının neden çıktıgını bi anlayamadım
2013-07-11 15:59:46

Php

.CSS style kodlarını ayrı dosyaya koymalısın. bu kalabalıkta php kodlarını seçmen zor olur.

Bu işlem için soru var mı ? arada görünmüyor .

Her programcı birgün Php yi tadacaktır
2013-07-11 20:36:16

phpkodlari.com © 2009 Herkes Php öğrenecek
Eglence ve Oyun: Gamikro