create account

PHP Tutorial Blog Series #6: Formlar (Forms) by hknyasar

View this thread on: hive.blogpeakd.comecency.com
· @hknyasar · (edited)
$20.37
PHP Tutorial Blog Series #6: Formlar (Forms)
<center>
![utopian-io2.jpg](https://res.cloudinary.com/hpiynhbhq/image/upload/v1512584499/jvhnf7g32ci8f7caflab.jpg)
</center><br><hr noshade>
Hi everybody, this is a 6. Turkish tutorial content about PHP programming language. Maybe you know, this is a script language and also open source. I am describing all of the series PHP programming language. I separate them into titles. I describe each title in detail in the form of a post. Also, you can also see the captions below.
<hr noshade>

Herkese merhaba. Biliyorsunuz bu blog serisinde sizlere açık kaynak kodlu bir programlama dili olan PHP den bahsediyorum. Nedir, nasıl ve nerelerde kullanılır, ne işimize yarar, PHP ile neler yapabiliriz, nasıl bir yapıya sahiptir mesela nesneye yönelik bir dil mi yoksa yapısal bir programlama dili midir, tek başına kullanılabilir mi yoksa başka web dilleriyle beraber mi kullanılıyor, syntax' ı nasıldır falan filan bunların hepsinden yani baştan aşağı php nin tüm konularından bahsediyorum. 

Siz de bu serinin tamamını okuduktan sonra PHP hakkında yeteri kadar bilgi sahibi olacağınıza inanıyorum. Zaten internette de bolca kaynak var oralardan da araştırıp daha detaylıca öğrenebilirsiniz. Ayrıca bu seride neler gördüğümüzü genel olarak başlıklar halinde aşağıda görebilirsiniz. Zaten her postta bu başlıklardan sadece birini anlatırım büyük ihtimalle. Hatta tek posta sığmazsa o başlığı birkaç postta da anlatabilirim. Bu postta 4. başlıktaki Formlarla İlgili İşlemler konusunu açıklayacağım.

You can see my previous works in here:

- [PHP Tutorial Blog Series #1](https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-1)
- [PHP Tutorial Blog Series #2](https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-2)
- [PHP Tutorial Blog Series #3](https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-3)
- [PHP Tutorial Blog Series & Loops #4](https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-4)
- [PHP Tutorial Blog Series #5 & PHP and HTML](https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-5-and-php-and-html)

## PHP Eğitici Blog Serisi

1- PHP Programlamaya Hazırlık, Değişkenler, Operatörler ve Bazı Fonksiyonlar
2- Stringler, Sabit Değerler, Çerezler ve Sunucu Bilgileri
3- Karşılaştırma ve Denetleme Mantığı, Döngüler
4- PHP ve HTML, Formlarla İlgili İşlemler
5- Diziler ve Dizi Fonsiyonları
6- Tarih ve Zamanla İlgili Fonsiyonlar
7- PHP Programlama Serisi Sonu

## 4) Formlarla İlgili İşlemler

Önceki postta php ve html arasındaki bağlantıyla ilgili olarak konuştuk. Sadece Php nin bir web sayfası olusturmak için yeterli bir araç olmadığını ve web işaretleme dili olan Html ve tasarım yapmamızı kolaylaştıran CSS ile beraber kullanıldığında ancak ortaya güzel bir ürün çıkacağından bahsettik.

Şimdi Html de de önemli bir konu olan ve birçok web sitesinde aktif şekilde kullanılmakta olan formlar konusuna değieceğiz. Bu formlar sayesinde kullanıcıdan bilgi alıp verebiliyoruz. Kullanıcıdan bilgi almanın ya da vermenin en kolay yollarında birisidir bu formlar. Hani siz bir siteye girerken bir parola ya da e-mail adresinizi girdiğiniz bir kutucuk var ya aslında o bir formdur. Sizin oraya girdiğiniz bilgiler arkada çalışan php kodları sayesinde sunucuya ulaşır, gereken işlemler yapılır.

Formları kullanarak birçok şey yapabiliriz. Kullanıcıdan bilgi alıp verebiliriz, bir üyelik formu oluşturup kullanıcıyı siteye üye yapabiliriz ya da siteye giriş ya da çıkış yapmasını sağlayabiliriz. Yani formlar kullanıcıyla iletişim kurmak için çok önemli bir araçtır. Formlar için kullanılan etiket form etiketidir. Bütün form elemanları bu form etiketleri arasında olur.

```
<form method="post" action="kayit.php">

</form>
```

Buradaki method ve action dediğimiz şeyler neler onları açıklayalım:

- <b>method:</b> Bu özellik formdaki bilgileri göndereceğimiz yöntemi tanımlamak için kullanılır. İki yöntem vardır. <b>POST</b> ya da <b>GET</b>. Bu iki değerden birisini alabilir.
- <b>action:</b> Bu özellik ise bilgilerin gönderildiği php programının ismini temsil eder.

Şimdi bir form oluşturmak için gereken elemanlara bakalım. Önce hepsini bir yazalım sonra tek tek inceleyelim.

```
Type                            Kullanım şekli

password                   <input type="password">

text                       <input type="text">

radio                      <input type="radio">

checkbox                   <input type="checkbox">

reset                      <input type="reset">

submit                      <input type="submit">

hidden                      <input type="hidden">

buton                       <input type="buton">

file                        <input type="file">
```
 
### Text

Bu özellik bir satırlık rakam ve yazıların girişi için kullanılır. Her text kutusunun ayrı bir ismi olur ve bu isimler name="isim" özelliği ile tanımlanmıştır. Örnek verelim:

```
<input type="text" name="isim" maxlength="30" value="">İsminizi giriniz</input>
```
Ekranda nasıl gözüktüğüne bakalım:

![1.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513634184/pz2qjfmliy34ekpq81lr.png)

### Checkbox

Bu checkbox dediğimiz şey adından da anlaşılacağı gibi onay işaretli kutucukları oluşturur. Hani bazen filtreleme yaparken ya da başka bir iş yaparken tik atıyoruz ya onlar bunlar işte.

```
<input type="checkbox" checked="checked" name="yonetmen" value="1"/> Stanley Kubrick

<input type="checkbox" name="yonetmen" value="2"/>Alfred Hitcock
```
<br>
Ekranda nasıl gözüktüğüne bakalım:
<br>
![2.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513634582/j96xnezm8c8lw8pbzjpb.png)

### Radio

Bu özellik kullaıcının birden fazla form seçeneklerinden birini tercih etmesini sağlar. Bu radio düğmelerinin tek bir adı olur.

```
<input type="radio" name="film" value="1"/> In The Name of The Father

<input type="radio" name="film" value="2"/> Le Grand Bleu
```
<br>
Ekranda nasıl gözüktüğüne bakalım:
<br>
![3.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513635070/vplxujqbea5ongncejmx.png)

### Password

Hani siteye girişlerde kullanılan kutucuk vardır ya.parola girdiğimiz işte o kutucuk bu özelliği kullanıyor aslında. Bu özellik form kutularına şifreli bilgilerin girilmesini sağlıyor ve yazdığınız şeyler * olarak gözükür.

```
<input type="password" name="parola"/> Parolayı giriniz:
```
<br>
Ekranda nasıl gözüktüğüne bakalım:
<br>
![4.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513635582/md3ujytvywwqi9z6cm7s.png)

### Hidden

Bu özellik kullanıcı tarafında gözükmesini istemediğimiz herhangi bir şeyi form içinde gizler.

```
<input type="hidden" name="no" value="17"/> 
```

### Textarea
Text tek satırlı yazılar içiin kullanılıyordu. Bu özellik ise çok satırlı yazılar için kullanılır. 

```
Buraya bir seyler yazın:<br>

<textarea rows="10" cols="35" name="yorumkismi"></textarea> 
```
<br>
Ekranda nasıl gözüktüğüne bakalım:
<br>
![5.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513636099/srwcvepbgsj1ukyx4ucu.png)

### Submit

Bu özellik form bilgilerini işlenmek üzere bir programa gönderir.

```
<input type="submit" name="kayit_olma" value="Gonder"/>
```
<br>
Ekranda nasıl gözüktüğüne bakalım:
<br>
![6.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513636375/z4lyopjb3zdylvlmolme.png)

Bir sonraki postta PHP ile formlardan bilgi alma konusuyla devam edeceğiz. 


<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@hknyasar/php-tutorial-blog-series-6-formlar-forms">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , ,
properties (23)
authorhknyasar
permlinkphp-tutorial-blog-series-6-formlar-forms
categoryutopian-io
json_metadata"{"community":"utopian","app":"steemit/0.1","format":"markdown","repository":{"id":1903522,"name":"php-src","full_name":"php/php-src","owner":{"login":"php","id":25158,"avatar_url":"https://avatars2.githubusercontent.com/u/25158?v=4","gravatar_id":"","url":"https://api.github.com/users/php","html_url":"https://github.com/php","followers_url":"https://api.github.com/users/php/followers","following_url":"https://api.github.com/users/php/following{/other_user}","gists_url":"https://api.github.com/users/php/gists{/gist_id}","starred_url":"https://api.github.com/users/php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php/subscriptions","organizations_url":"https://api.github.com/users/php/orgs","repos_url":"https://api.github.com/users/php/repos","events_url":"https://api.github.com/users/php/events{/privacy}","received_events_url":"https://api.github.com/users/php/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/php/php-src","description":"The PHP Interpreter","fork":false,"url":"https://api.github.com/repos/php/php-src","forks_url":"https://api.github.com/repos/php/php-src/forks","keys_url":"https://api.github.com/repos/php/php-src/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php/php-src/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php/php-src/teams","hooks_url":"https://api.github.com/repos/php/php-src/hooks","issue_events_url":"https://api.github.com/repos/php/php-src/issues/events{/number}","events_url":"https://api.github.com/repos/php/php-src/events","assignees_url":"https://api.github.com/repos/php/php-src/assignees{/user}","branches_url":"https://api.github.com/repos/php/php-src/branches{/branch}","tags_url":"https://api.github.com/repos/php/php-src/tags","blobs_url":"https://api.github.com/repos/php/php-src/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php/php-src/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php/php-src/git/refs{/sha}","trees_url":"https://api.github.com/repos/php/php-src/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php/php-src/statuses/{sha}","languages_url":"https://api.github.com/repos/php/php-src/languages","stargazers_url":"https://api.github.com/repos/php/php-src/stargazers","contributors_url":"https://api.github.com/repos/php/php-src/contributors","subscribers_url":"https://api.github.com/repos/php/php-src/subscribers","subscription_url":"https://api.github.com/repos/php/php-src/subscription","commits_url":"https://api.github.com/repos/php/php-src/commits{/sha}","git_commits_url":"https://api.github.com/repos/php/php-src/git/commits{/sha}","comments_url":"https://api.github.com/repos/php/php-src/comments{/number}","issue_comment_url":"https://api.github.com/repos/php/php-src/issues/comments{/number}","contents_url":"https://api.github.com/repos/php/php-src/contents/{+path}","compare_url":"https://api.github.com/repos/php/php-src/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php/php-src/merges","archive_url":"https://api.github.com/repos/php/php-src/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php/php-src/downloads","issues_url":"https://api.github.com/repos/php/php-src/issues{/number}","pulls_url":"https://api.github.com/repos/php/php-src/pulls{/number}","milestones_url":"https://api.github.com/repos/php/php-src/milestones{/number}","notifications_url":"https://api.github.com/repos/php/php-src/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php/php-src/labels{/name}","releases_url":"https://api.github.com/repos/php/php-src/releases{/id}","deployments_url":"https://api.github.com/repos/php/php-src/deployments","created_at":"2011-06-16T01:52:25Z","updated_at":"2017-12-18T12:44:34Z","pushed_at":"2017-12-18T21:01:02Z","git_url":"git://github.com/php/php-src.git","ssh_url":"git@github.com:php/php-src.git","clone_url":"https://github.com/php/php-src.git","svn_url":"https://github.com/php/php-src","homepage":"http://www.php.net","size":305237,"stargazers_count":13533,"watchers_count":13533,"language":"C","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4549,"mirror_url":null,"archived":false,"open_issues_count":121,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4549,"open_issues":121,"watchers":13533,"default_branch":"master","score":149.04616},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","tutorial"],"links":["https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-1","https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-2","https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-3","https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-4","https://steemit.com/utopian-io/@hknyasar/php-tutorial-blog-series-5-and-php-and-html","https://utopian.io/utopian-io/@hknyasar/php-tutorial-blog-series-6-formlar-forms"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1512584499/jvhnf7g32ci8f7caflab.jpg","https://res.cloudinary.com/hpiynhbhq/image/upload/v1513634184/pz2qjfmliy34ekpq81lr.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1513634582/j96xnezm8c8lw8pbzjpb.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1513635070/vplxujqbea5ongncejmx.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1513635582/md3ujytvywwqi9z6cm7s.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1513636099/srwcvepbgsj1ukyx4ucu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1513636375/z4lyopjb3zdylvlmolme.png"]}"
created2017-12-18 22:34:39
last_update2017-12-18 22:56:48
depth0
children3
last_payout2017-12-25 22:34:39
cashout_time1969-12-31 23:59:59
total_payout_value14.394 HBD
curator_payout_value5.974 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length7,504
author_reputation17,021,028,463,600
root_title"PHP Tutorial Blog Series #6: Formlar (Forms)"
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,090,015
net_rshares4,050,443,609,644
author_curate_reward""
vote details (15)
@damla ·
$0.04
Thank you for the contribution. It has been approved.

You can contact us on [Discord](https://discord.gg/UCvqCsx).
**[[utopian-moderator]](https://utopian.io/moderators)**
👍  
properties (23)
authordamla
permlinkre-hknyasar-php-tutorial-blog-series-6-formlar-forms-20171219t032709437z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2017-12-19 03:27:21
last_update2017-12-19 03:27:21
depth1
children1
last_payout2017-12-26 03:27:21
cashout_time1969-12-31 23:59:59
total_payout_value0.034 HBD
curator_payout_value0.009 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length172
author_reputation87,558,484,358,792
root_title"PHP Tutorial Blog Series #6: Formlar (Forms)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,119,577
net_rshares7,194,778,948
author_curate_reward""
vote details (1)
@hknyasar ·
you're welcome, thank you
properties (22)
authorhknyasar
permlinkre-damla-re-hknyasar-php-tutorial-blog-series-6-formlar-forms-20171219t141300263z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2017-12-19 16:13:00
last_update2017-12-19 16:13:00
depth2
children0
last_payout2017-12-26 16:13:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length25
author_reputation17,021,028,463,600
root_title"PHP Tutorial Blog Series #6: Formlar (Forms)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,209,309
net_rshares0
@utopian-io ·
### Hey @hknyasar I am @utopian-io. I have just upvoted you!
#### Achievements
- Seems like you contribute quite often. AMAZING!
#### Suggestions
- Contribute more often to get higher and higher rewards. I wish to see you often!
- Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!
#### Get Noticed!
- Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
properties (22)
authorutopian-io
permlinkre-hknyasar-php-tutorial-blog-series-6-formlar-forms-20171220t014336353z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2017-12-20 01:43:36
last_update2017-12-20 01:43:36
depth1
children0
last_payout2017-12-27 01:43:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,428
author_reputation152,955,367,999,756
root_title"PHP Tutorial Blog Series #6: Formlar (Forms)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,276,451
net_rshares0