Skip to content

Instantly share code, notes, and snippets.

@benabdullah
Last active August 11, 2017 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benabdullah/f4b44bf407a6439edb013f8cd277186d to your computer and use it in GitHub Desktop.
Save benabdullah/f4b44bf407a6439edb013f8cd277186d to your computer and use it in GitHub Desktop.
Post metodu kullanımının html kısmı ( form kısmı )
<!doctype html>
<html lang="tr">
<head>
<meta charset="utf-8">
<title>Php Form İle Post Methodu Kullanımı</title>
<meta name="description" content="Php ile form kullanımı">
<meta name="author" content="libedux">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-offset-2 col-lg-8" style="margin-top:40px;">
<h3> Örnek Uygulama ( Post Methodu İçin ) </h3>
<small class="form-text text-muted">Aynı Örneğin <b>Get Methodu</b> Kullanarak Gösterildiği Sayfaya Geçmek İçin <a href="index-get.php">Tıklayınız</a> </small>
<br/>
<br/>
<form method="post" action="form-post.php"> <!-- Formumuzu oluşturduk, method özelliğine post yazarsak, php de POST metodu ile okuruz, get yazarsak, GET metodu ile okuruz !-->
<!-- İsim !-->
<div class="form-group">
<label for="isim">İsim</label>
<input type="text" class="form-control" id="isim" name="isim" placeholder="İsminizi yazınız" >
</div>
<!-- Soyisim !-->
<div class="form-group">
<label for="soyisim">Soyisim</label>
<input type="text" class="form-control" id="soyisim" name="soyisim" placeholder="Soyisminizi yazınız" >
</div>
<!-- Yaş !-->
<div class="form-group">
<label for="yas">Yaş</label>
<input type="number" min="0" max="120" class="form-control" id="yas" name="yas" placeholder="Yaşınızı yazınız" >
</div>
<!-- Cinsiyet !-->
<div class="form-group">
<label >Cinsiyet</label> <br/>
<label style="margin-right:20px;"> <input type="radio" id="erkek" value="Erkek" name="cinsiyet"> Erkek </label>
<label> <input type="radio" id="kadın" value="Kadın" name="cinsiyet"> Kadın </label>
</div>
<br/>
<!-- Mesaj !-->
<div class="form-group">
<label for="mesaj">Mesajınız</label>
<textarea class="form-control" name="mesaj" id="mesaj">Mesajınızı Girebilirsiniz</textarea>
</div>
<!-- Email !-->
<div class="form-group">
<label for="mail">Email Adresiniz</label>
<input type="email" class="form-control" name="mail" id="mail" >
<small id="emailHelp" class="form-text text-muted">Girdiğiniz hiç bir bilgi kayıt altına alınmamaktadır.</small>
</div>
<!-- Adresiniz !-->
<div class="form-group">
<label for="adres">Adresiniz</label>
<textarea class="form-control" name="adres" id="adres">Adresinizi Girebilirsiniz</textarea>
</div>
<button type="submit" class="btn btn-primary">Formu Yolla</button> <!-- Type Submit sayesinde ,bu butona tıklandığında formumuzu yollayacağımızı belirtiyoruz !-->
</form>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment