<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CodErode &#187; PHP</title>
	<atom:link href="http://www.coderode.com/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.coderode.com</link>
	<description>Hepsinden Bir Kaç Byte...</description>
	<lastBuildDate>Fri, 11 Jun 2010 16:13:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>PHP ve CSS ile Basit Bir İlerleme Çubuğu</title>
		<link>http://www.coderode.com/php-css-ilerleme-cubugu.html</link>
		<comments>http://www.coderode.com/php-css-ilerleme-cubugu.html#comments</comments>
		<pubDate>Tue, 02 Jun 2009 10:55:52 +0000</pubDate>
		<dc:creator>User-99</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Css]]></category>
		<category><![CDATA[ilerleme cubugu]]></category>
		<category><![CDATA[php ile ilerleme]]></category>

		<guid isPermaLink="false">http://www.coderode.com/?p=320</guid>
		<description><![CDATA[PHP ve birazda CSS&#8217; in yardımıyla basit fakat kullanışlı bir ilerleme çubuğu örneği.Daha fazla geliştirilebilir elbet, bu size kalmış.Anlamadığınız herhangi bir yer ile ilgili her türlü sorunuza elimden geldiğince cevap vermeye çalışırım. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 [...]]]></description>
			<content:encoded><![CDATA[<p>PHP ve birazda CSS&#8217; in yardımıyla basit fakat kullanışlı bir ilerleme çubuğu örneği.Daha fazla geliştirilebilir elbet, bu size kalmış.Anlamadığınız herhangi bir yer ile ilgili her türlü sorunuza elimden geldiğince cevap vermeye çalışırım.</p>

<div class="wp_codebox"><table><tr id="p3202"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
</pre></td><td class="code" id="p320code2"><pre class="php" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
&lt;head&gt;
	&lt;title&gt;PHP - Ilerleme Cubugu&lt;/title&gt;
&nbsp;
&lt;span id=&quot;more-320&quot;&gt;&lt;/span&gt;
&nbsp;
	&lt;style type=&quot;text/css&quot;&gt;
		/*İlerleme çubuğumuzun çerçeve kısmı*/
		.cerceve {
			width: 300px; /*Genişlik*/
			padding: 2px; /*İçe doğru 2px çök*/
			border: 2px solid #666666; /*Kenarlık özellikleri*/
		}
&nbsp;
		.ilerleme {
			text-align: center; /*İçindeki metinler ortalansın*/
			font-size: 15px; /*Font büyüklüğü 15px olsun*/
		}
	&lt;/style&gt;
&nbsp;
&lt;/head&gt;
&lt;body&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$Yuzdeler</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">23</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">38</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">75</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">12</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">47</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">7</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">64</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Yüzldeleri bir diziye atıyoruz</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$Yuzdeler</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$Yuzde</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Yüzdeleri sorgulamak için teker teker alıyoruz</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$Yuzde</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// Yüzde 30 dan küçük ise...</span>
			<span style="color: #000088;">$Renk</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#99cc00'</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$Yuzde</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">30</span> and <span style="color: #000088;">$Yuzde</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// Yüzde 30 dan büyük ve 60 dan küçük ise...</span>
			<span style="color: #000088;">$Renk</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#ffcc66'</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">else</span> <span style="color: #666666; font-style: italic;">// Yukarıdakiler değilse... (Dolayısıyla 60 dan büyük ise)</span>
			<span style="color: #000088;">$Renk</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#cc0033'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;div class=&quot;cerceve&quot;&gt;
		&lt;div class=&quot;ilerleme&quot; style=&quot;background-color: <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$Renk</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>; width: <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$Yuzde</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>%;&quot;&gt;%<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$Yuzde</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
	&lt;/div&gt;
	&lt;br /&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p>Çıktısı şöyle olacaktır:<br />
<img title="ilerleme-cubugu" src="http://img254.imageshack.us/img254/9398/ilerlemephpcss.png" alt="ilerleme cubugu" width="324" height="303" /></p>
<p>İyi çalışmalar.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderode.com/php-css-ilerleme-cubugu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ziyaretçi Defteri Yazalım &#8211; 1</title>
		<link>http://www.coderode.com/ziyaretci-defteri-yazalim-1.html</link>
		<comments>http://www.coderode.com/ziyaretci-defteri-yazalim-1.html#comments</comments>
		<pubDate>Thu, 22 Jan 2009 16:06:38 +0000</pubDate>
		<dc:creator>User-99</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Css]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[kodlama]]></category>
		<category><![CDATA[Tasarım]]></category>
		<category><![CDATA[ziyaretçi defteri]]></category>

		<guid isPermaLink="false">http://www.coderode.com/?p=116</guid>
		<description><![CDATA[Merhaba, arkadaşlar! Bu benim sizlerle paylaşacağım ilk yazım olacak.Umarım ilerde daha fazlasını paylaşma fırsatı bulurum.Sizler de isteklerinizi, önerilerinizi veya herhangi bir sorunuzu/sorununuzu bana iletebilirsiniz.Bende sizlere elimden geldiği kadar yardımcı olmaya çalışıcam. Bu yazıda Ziyaretçi defterine kısaca &#8220;ZD&#8221; diyeceğiz.Şimdi isterseniz sizlerle birlikte neler yapacağımıza şöyle bir bakalım. 1. Ziyaretçi Bölümü: Ziyaretçilerin mesaj gönderebileceği ve gönderilen mesajların [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba, arkadaşlar!</p>
<p>Bu benim sizlerle paylaşacağım ilk yazım olacak.Umarım ilerde daha fazlasını paylaşma fırsatı bulurum.Sizler de isteklerinizi, önerilerinizi veya</p>
<p>herhangi bir sorunuzu/sorununuzu bana iletebilirsiniz.Bende sizlere elimden geldiği kadar yardımcı olmaya çalışıcam.</p>
<p><span id="more-116"></span></p>
<p>Bu yazıda Ziyaretçi defterine kısaca &#8220;ZD&#8221; diyeceğiz.Şimdi isterseniz sizlerle birlikte neler yapacağımıza şöyle bir bakalım.</p>
<p><span style="color: #ff0000;"><strong><span style="color: #000000;">1. Ziyaretçi Bölümü:</span></strong></span> Ziyaretçilerin mesaj gönderebileceği ve gönderilen mesajların listelendiği bir anasayfa</p>
<p><span style="color: #ff0000;"><strong><span style="color: #000000;">2. Yönetici Paneli:</span></strong></span> ZD. sahibinin ziyaretçiden gelen mesajları yöntmesini sağlayan yönetim paneli</p>
<h2><span style="color: #800000;">1. Ziyaretçi Bölümü</span></h2>
<p>Şimdi veritabanımızı tasarlayarak başlayalım.Bunun için ziyaretçiden ne tür bilgiler alacağımızı belirlemeliyiz.Ben ziyaretçiden isim, e-pota ve mesajını</p>
<p>almaya karar verdim.Bildiğiniz gibi geneldede böyle olur.Siz isterseniz daha farklı bilgiler isteyebilirsiniz.</p>
<p>Tablo adı &#8220;benimzd&#8221; olan ve &#8220;no, isim, eposta, mesaj, tarih&#8221; sütunlarından oluşan bir veritabanı oluşturalım:</p>
<p><span style="color: #ff0000;"><strong>a) Veritabanı</strong></span></p>

<div class="wp_codebox"><table><tr id="p11612"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p116code12"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`benimzd`</span> <span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">`no`</span> int<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">auto_increment</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`isim`</span> varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> character <span style="color: #993333; font-weight: bold;">set</span> latin5 <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`eposta`</span> varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> character <span style="color: #993333; font-weight: bold;">set</span> latin5 <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`mesaj`</span> text character <span style="color: #993333; font-weight: bold;">set</span> latin5 <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`tarih`</span> date <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`no`</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>MyISAM <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>latin1 <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> ;</pre></td></tr></table></div>

<p>Evet veritabanımızı tasarladık ve oluşturduk.Şimdi ise basit bir tasarım yapalım.Mesajlarda kullanıcı ismi, tarih ve mesaj görüntülenecek.Buna uygun bir tasarım yapalım.</p>
<p><span style="color: #ff0000;"><strong>b) Tasarım</strong></span></p>
<p>b-1) HTML</p>

<div class="wp_codebox"><table><tr id="p11613"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
</pre></td><td class="code" id="p116code13"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;link href=&quot;stil.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
&nbsp;
&lt;!-- Taşıyıcı-Başlangıç --&gt;
&lt;div id=&quot;tasiyici&quot;&gt;
&nbsp;
	&lt;!-- Mesaj-Başlangıç --&gt;
&lt;div id=&quot;baslik&quot;&gt;
&lt;h1&gt;Benim ZD&lt;/h1&gt;
&lt;/div&gt;
&nbsp;
	&lt;!--Başlık-Son --&gt;
&nbsp;
	&lt;!-- Mesaj-Başlangıç --&gt;
&lt;div class=&quot;mesaj-kutusu&quot;&gt;
&lt;div class=&quot;mesaj-bilgi&quot;&gt;&lt;b&gt;Ali Veli&lt;/b&gt; | 12.02.2008&lt;/div&gt;
&lt;div class=&quot;mesaj&quot;&gt;
			Bu bir ziyaretçi mesajıdır.
		&lt;/div&gt;
&lt;/div&gt;
&nbsp;
	&lt;!-- Mesaj-Son --&gt;
&nbsp;
	&lt;!-- Mesaj-Başlangıç --&gt;
&lt;div class=&quot;mesaj-kutusu&quot;&gt;
&lt;div class=&quot;mesaj-bilgi&quot;&gt;&lt;b&gt;&lt;a href=&quot;&quot;&gt;Veli Ahmet&lt;/a&gt;&lt;/b&gt; | 12.02.2008&lt;/div&gt;
&lt;div class=&quot;mesaj&quot;&gt;
			Bu başka bir ziyaretçi mesajıdır.
		&lt;/div&gt;
&lt;/div&gt;
&nbsp;
	&lt;!-- Mesaj-Son --&gt;
&nbsp;
	&lt;!-- Sayfalama-Başlangıç --&gt;
&lt;div id=&quot;sayfalar&quot;&gt;
		&lt;a href=&quot;?sayfa=0&quot;&gt;1&lt;/a&gt;
		&lt;a href=&quot;?sayfa=0&quot;&gt;2&lt;/a&gt;
		&lt;a href=&quot;?sayfa=0&quot;&gt;3&lt;/a&gt;
		&lt;a href=&quot;?sayfa=0&quot;&gt;4&lt;/a&gt;
	&lt;/div&gt;
&nbsp;
	&lt;!-- Sayfalama-Son --&gt;
&nbsp;
	&lt;!-- MesajFormu-Başlangıç --&gt;
&lt;div id=&quot;mesaj-formu&quot;&gt;
&lt;form action=&quot;ekle.php&quot; method=&quot;post&quot;&gt;
&lt;input type=&quot;text&quot; name=&quot;frm_isim&quot; id=&quot;frm_isim&quot; size=&quot;22&quot; tabindex=&quot;1&quot; /&gt;
			&lt;label for=&quot;frm_isim&quot;&gt;&lt;small&gt;İsminiz (gerekli)&lt;/small&gt;&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;frm_eposta&quot; id=&quot;frm_eposta&quot; size=&quot;22&quot; tabindex=&quot;2&quot; /&gt;
			&lt;label for=&quot;frm_eposta&quot;&gt;E-Posta Adresiniz (isteğe bağlı)&lt;/label&gt;
&nbsp;
			&lt;textarea name=&quot;frm_mesaj&quot; id=&quot;frm_mesaj&quot; cols=&quot;64%&quot; rows=&quot;5&quot; tabindex=&quot;4&quot;&gt;&lt;/textarea&gt;
&lt;input name=&quot;frm_gonder&quot; type=&quot;submit&quot; tabindex=&quot;5&quot; value=&quot;Gönder&quot; /&gt;
&lt;/form&gt;
&lt;/div&gt;
&nbsp;
	&lt;!-- MesajFormu-Son --&gt;
&nbsp;
	&lt;!-- Ayak-Başlangıç --&gt;
&lt;div id=&quot;ayak&quot;&gt;
&nbsp;
Tüm haklarını gizledik, bulamassınız!
&lt;/div&gt;
&nbsp;
	&lt;!-- Ayak-Son --&gt;
&lt;/div&gt;
&nbsp;
&lt;!-- Taşıyıcı-Son --&gt;
&nbsp;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p>HTML kodumuz bu şekilde, şimdi CSS ile tasarımızı renklendirelim;</p>
<p><span style="color: #ff0000;"><strong>b-2) CSS</strong></span></p>

<div class="wp_codebox"><table><tr id="p11614"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
</pre></td><td class="code" id="p116code14"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#778899</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Arkaplan rengimiz */</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Trebuchet MS&quot;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Fontumuzu belirtiyoruz */</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Varsayılan yazı boyutu */</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Varsayılan yazı rengi */</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Yazılar sola dayansın */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#baslik</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/*Sitemizin başlığının bulunduğu bölüm*/</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Arkaplan rengimizi beyaz olarak ayarlıyoruz*/</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Yazı rengi kırmızı */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#tasiyici</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* 600px genişliğinde ortalanmış bir sayfa */</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.mesaj-kutusu</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* Mesajların bulunduğu sınıf */</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#d2691e</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #6666ff;">.mesaj-kutusu</span> <span style="color: #6666ff;">.mesaj</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ffd700</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Mesajların rengi */</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #6666ff;">.mesaj-kutusu</span> <span style="color: #6666ff;">.mesaj-bilgi</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* Mesaj bilgilerinin bulunduğu sınıf */</span>
		<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">green</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #6666ff;">.mesaj-kutusu</span> <span style="color: #6666ff;">.mesaj-bilgi</span> b <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* Yazar adının vurgusu (linksiz)*/</span>
		<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #6666ff;">.mesaj-kutusu</span> <span style="color: #6666ff;">.mesaj-bilgi</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* Yazar adının vurgusu (linkli)*/</span>
		<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">lime</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #6666ff;">.mesaj-kutusu</span> <span style="color: #6666ff;">.mesaj-bilgi</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sayfalar</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* Sayfalama için stil veriyoruz*/</span>
	<span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #cc00cc;">#sayfalar</span> a <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #cc00cc;">#sayfalar</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #cc00cc;">#sayfalar</span> a<span style="color: #6666ff;">.aktif</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#mesaj-formu</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #cc00cc;">#mesaj-formu</span> input<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#mesaj-formu</span> textarea <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Trebuchet MS&quot;</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#ayak</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* Sitemizin ayaklık kısmı */</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#696969</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Sonuç olarak aşağıdaki gibi bir tasarım ortaya çıkartmış olduk:</p>
<p><img class="aligncenter size-full wp-image-118" title="zd-onizleme1" src="http://www.coderode.com/wp-content/zd-onizleme1.png" alt="zd-onizleme1" width="674" height="801" /></p>
<p>Böylelikle tasarım kısmını bitirmiş oluyoruz ve kodlama kısmına geçiyoruz.</p>
<p><span style="color: #ff0000;"><strong>c) Kodlama</strong></span></p>
<p>Kodlamaya geçmeden önce kendimize bir dosya düzeni belirlememiz bize kolaylık sağlayacaktır.</p>
<p>/hariciler</p>
<p>&#8211;vt_baglan.php</p>
<p>&#8211;site_bilgiler.php</p>
<p>/css</p>
<p>&#8211;stil.css</p>
<p>/site_ust.php</p>
<p>/site_alt.php</p>
<p>/index.php</p>
<p>/ekle.php</p>
<p>Basit bir dosya düzeni çıkarttık kendimize.Dosyaların ne görev gördüğü isimlerinden anlaşılıyor zaten.Yinede kodlarken daha iyi anlayacaksınız.</p>
<p><span style="color: #ff0000;"><strong>c-1) vt_baglan.php</strong></span></p>
<p>Veri tabanına bağlanmak için bu dosyayı kullanacağız.Bu dosyanın içeriği ise şöyle;</p>

<div class="wp_codebox"><table><tr id="p11615"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code" id="p116code15"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$vt_alan</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'veritabanı alan adı'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$vt_isim</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'veritabanı adı'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$vt_kullanici</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'veritabanı kullanıcı adı'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$vt_sifre</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'veritabanı şifresi'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$vt</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$vt_alan</span><span style="color: #339933;">,</span> <span style="color: #000088;">$vt_kullanici</span><span style="color: #339933;">,</span> <span style="color: #000088;">$vt_sifre</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$vt</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$tablo_sec</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$vt_isim</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$tablo_sec</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Veritabanı seçilemedi!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
	<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Veritabanına bağlanılamadı!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><span style="color: #ff0000;"><strong>c-2) site_bilgiler.php</strong></span></p>
<p>Sitemiz ile ilgili bazı verileri içeren dosyamız.Bununda içeriği aşağıdaki gibidir.</p>

<div class="wp_codebox"><table><tr id="p11616"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p116code16"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tarayici_baslik'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Hoşgeldiniz! - Z. Defterim'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Tarayıcı başlığı</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'site_baslik'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Benim ZD'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Site başlığı</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'site_hakki'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Tüm hakları saklıdır.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Sitenin hakları vs...</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sayfa_basi_mesaj'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Sayfa başına sıralanacak mesaj sayısı</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><span style="color: #ff0000;"><strong>c-3) stil.css</strong></span></p>
<p>İçeriği tasarım kısmında yazdığımız css kodudur.</p>
<p>c-4)site_ust.php</p>
<p>Bu dosya sitemizin üst kımındaki (tarayıcı başlığı, site başlığı vs.) bilgileri içeriyor.İçeriğini ise şöyle yapıyoruz;</p>

<div class="wp_codebox"><table><tr id="p11617"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code" id="p116code17"><pre class="php" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;link href=&quot;css/stil.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
&nbsp;
&lt;!-- Taşıyıcı-Başlangıç --&gt;
&lt;div id=&quot;tasiyici&quot;&gt;
&nbsp;
	&lt;!-- Mesaj-Başlangıç --&gt;
&lt;div id=&quot;baslik&quot;&gt;
&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> site_baslik<span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;
&lt;/div&gt;
&nbsp;
	&lt;!--Başlık-Son --&gt;</pre></td></tr></table></div>

<p>c-5) site_alt.php</p>
<p>Sitemizin alt kısmının HTML kodunu tutan dosyadır.İçeriği gösterecek olursak;</p>

<div class="wp_codebox"><table><tr id="p11618"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p116code18"><pre class="php" style="font-family:monospace;">&lt;!-- Ayak-Başlangıç --&gt;
&lt;div id=&quot;ayak&quot;&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> site_hakki<span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
&nbsp;
	&lt;!-- Ayak-Son --&gt;
&lt;/div&gt;
&nbsp;
&lt;!-- Taşıyıcı-Son --&gt;
&nbsp;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p><span style="color: #ff0000;"><strong>c-6)  index.php</strong></span></p>
<p>Evet geldi sıra şimdi anasayfamızı yazmaya.Yazdığımız diğer dosyaların burada toplayacağız.</p>

<div class="wp_codebox"><table><tr id="p11619"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
</pre></td><td class="code" id="p116code19"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'hariciler/vt_baglan.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// VT bağlantısı için kullandığımız dosyayı ekliyoruz</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'hariciler/site_bilgiler.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">// Site içi bazı sabit bilgileri içeren dosyamızı ekliyoruz</span>
&nbsp;
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'site_ust.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//Üst kısmı ekliyoruz</span>
&nbsp;
<span style="color: #000088;">$sayfa</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// sayfa varsayılan olarak 0</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sayfa'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//eğer sayfa değiştiriliyorsa...</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$sayfa</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sayfa'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Mesajlar sıralanıyor...</span>
<span style="color: #000088;">$sorgu</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'SELECT * FROM benimzd ORDER BY no DESC LIMIT '</span><span style="color: #339933;">.</span><span style="color: #000088;">$sayfa</span><span style="color: #339933;">.</span><span style="color: #0000ff;">', '</span><span style="color: #339933;">.</span>sayfa_basi_mesaj<span style="color: #339933;">;</span>
<span style="color: #000088;">$mesajlar</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sorgu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$mesajlar</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$toplam</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mesajlar</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$toplam</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$mesaj</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_assoc</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mesajlar</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$isim</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$mesaj</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'isim'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mesaj</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'eposta'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$isim</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;a href=&quot;mailto:'</span><span style="color: #339933;">.</span><span style="color: #000088;">$mesaj</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'eposta'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$mesaj</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'isim'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;mesaj-kutusu&quot;&gt;
&lt;div class=&quot;mesaj-bilgi&quot;&gt;&lt;b&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$isim</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/b&gt; | <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$mesaj</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tarih'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&lt;div class=&quot;mesaj&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$mesaj</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'mesaj'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&lt;/div&gt;
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Hiç mesaj bulunamadı.'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Eğer hiç mesaj yoksa uyarı ver</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'MySQL sorgu hatası oluştu!'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Sorgu hatası oluşursa uyar</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Sayfalama yapılıyor</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'
&lt;div id=&quot;sayfalar&quot;&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$toplam_sorgusu</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SELECT no FROM benimzd'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$toplam_mesaj</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$toplam_sorgusu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$toplam_mesaj</span> <span style="color: #339933;">/=</span> sayfa_basi_mesaj<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$sayfa_sayac</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sayfa_link</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sayfa_sayac</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$toplam_mesaj</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$sayfa_sayac</span> <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$aktif</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sayfa_link</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$sayfa</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'class=&quot;aktif&quot;'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a '</span><span style="color: #339933;">.</span><span style="color: #000088;">$aktif</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' href=&quot;?sayfa='</span><span style="color: #339933;">.</span><span style="color: #000088;">$sayfa_link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$sayfa_sayac</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$sayfa_link</span> <span style="color: #339933;">+=</span> sayfa_basi_mesaj<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt;
&nbsp;
'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Mesaj ekleme formu...</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div id=&quot;mesaj-formu&quot;&gt;
&lt;form action=&quot;ekle.php&quot; method=&quot;post&quot;&gt;
&lt;input type=&quot;text&quot; name=&quot;frm_isim&quot; id=&quot;frm_isim&quot; size=&quot;22&quot; tabindex=&quot;1&quot; /&gt;
		&lt;label for=&quot;frm_isim&quot;&gt;&lt;small&gt;İsminiz (gerekli)&lt;/small&gt;&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;frm_eposta&quot; id=&quot;frm_eposta&quot; size=&quot;22&quot; tabindex=&quot;2&quot; /&gt;
		&lt;label for=&quot;frm_eposta&quot;&gt;E-Posta Adresiniz (isteğe bağlı)&lt;/label&gt;
&nbsp;
		&lt;textarea name=&quot;frm_mesaj&quot; id=&quot;frm_mesaj&quot; cols=&quot;64%&quot; rows=&quot;5&quot; tabindex=&quot;4&quot;&gt;&lt;/textarea&gt;
&lt;input name=&quot;frm_gonder&quot; type=&quot;submit&quot; tabindex=&quot;5&quot; value=&quot;Gönder&quot; /&gt;
&lt;/form&gt;
&lt;/div&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Açmış olduğumuz VT bağlantısını kapatıyoruz</span>
&nbsp;
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'site_alt.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//Sitemizin alt kısmını ekliyoruz</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><span style="color: #ff0000;"><strong>c-7) ekle.php</strong></span></p>
<p>Mesajları eklemek için kullanacağımız dosya;</p>

<div class="wp_codebox"><table><tr id="p11620"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
</pre></td><td class="code" id="p116code20"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'hariciler/vt_baglan.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//VT bağlantısını gerçekleştiriyoruz</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Mesaj formu değişkenlerini alıyoruz</span>
<span style="color: #000088;">$isim</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'frm_isim'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$eposta</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'frm_eposta'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$mesaj</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'frm_mesaj'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Eğer isim ve mesaj girilmişse...</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$isim</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span><span style="color: #666666; font-style: italic;">#038;&amp; !empty($mesaj))
</span><span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">//Girilen verilerdeki zararlı kodları temizliyoruz</span>
	<span style="color: #000088;">$isim</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$isim</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$isim</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$isim</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$mesaj</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mesaj</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$mesaj</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mesaj</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//Eğer eposta da  girilmişse onu da temizle</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$eposta</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$eposta</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$eposta</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$eposta</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$eposta</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//Sorguyu hazırla</span>
	<span style="color: #000088;">$sorgu</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'INSERT INTO benimzd(isim, eposta, mesaj, tarih) VALUES(&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$isim</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;, &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$eposta</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;, &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$mesaj</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;, NOW())'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$durum</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sorgu</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//Duruma göre işlem yap</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$durum</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Location: index.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'MySQL sorgu hatası!'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Location: index.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Evet arkadaşlar hepsi bu kadar.Yönetici panelini bu yazının ikinci bölümünde yazacağız.Umarım birileri için faydalı olur.İsterseniz bitmiş projeyi aşağıdaki bağlantıdan indirebilirsiniz.</p>
<p>Herkese iyi çalışmalar ve çalışmalarında başarılar&#8230;</p>
<p>İndirme Adresi:  <a href="http://rapidshare.com/files/187690379/coderode_zd.rar" target="_blank">http://rapidshare.com/files/187690379/coderode_zd.rar</a></p>
<p>Saygılarımla</p>
<p>User-99</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderode.com/ziyaretci-defteri-yazalim-1.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
