Başlangıç olarak phpmyadmin de webalihan veri tabanı oluşturuyoruz.İsmini uye tablonun satır sayısı 2
aşağıdaki kodları bir dosyanın içinde hazırlayıp wampserver da www klasörünün içine ekliyoruz daha sonra localhosttan html sayfamızı açıyoruz
HTML SAYFASININ KODU:
<body>
<form id="form1" name="form1" method="post" action="kayit.php">
İsminiz :<span id="sprytextfield1">
<label>
<input type="text" name="isim" id="text1" />
</label>
<span class="textfieldRequiredMsg">A value is required.</span></span>
<p>
<label>
<input type="submit" name="button" id="button" value="Kaydet" />
</label>
</p>
</form>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
//-->
</script>
</body>
kayit.php SAYFASININ KODU:
<body>
<?php
$baglanti=mysql_connect("localhost","root","")or mysql_error();
mysql_select_db("kariyervideo",$baglanti)or mysql_error();
$isim=$_POST['isim'];
$sql=mysql_query("INSERT INTO kayitlar (isim) VALUES ('$isim')",$baglanti) or mysql_error();
echo"Veri tabanı işleminiz eklenmiştir";
?>
</body>
aşağıdaki kodları bir dosyanın içinde hazırlayıp wampserver da www klasörünün içine ekliyoruz daha sonra localhosttan html sayfamızı açıyoruz
HTML SAYFASININ KODU:
<body>
<form id="form1" name="form1" method="post" action="kayit.php">
İsminiz :<span id="sprytextfield1">
<label>
<input type="text" name="isim" id="text1" />
</label>
<span class="textfieldRequiredMsg">A value is required.</span></span>
<p>
<label>
<input type="submit" name="button" id="button" value="Kaydet" />
</label>
</p>
</form>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
//-->
</script>
</body>
kayit.php SAYFASININ KODU:
<body>
<?php
$baglanti=mysql_connect("localhost","root","")or mysql_error();
mysql_select_db("kariyervideo",$baglanti)or mysql_error();
$isim=$_POST['isim'];
$sql=mysql_query("INSERT INTO kayitlar (isim) VALUES ('$isim')",$baglanti) or mysql_error();
echo"Veri tabanı işleminiz eklenmiştir";
?>
</body>