Skip to content

Instantly share code, notes, and snippets.

@bsaral
Created December 22, 2011 21:34
Show Gist options
  • Save bsaral/1511960 to your computer and use it in GitHub Desktop.
Save bsaral/1511960 to your computer and use it in GitHub Desktop.
form.php
<META http-equiv=content-type content=text/html;charset=UTF-8>
<?php
$baglan=mysql_connect("localhost","root","SİZİN ŞİFRENİZ") or die ("veri tabanına bağlanamadı.");
if(!$baglan){
die ("veritabanına bağlanılmadı.".mysql_error());
}
$veri=mysql_query("create database if not exists kaydet",$baglan);
if ($veri){
echo "veritabanı oluşturuldu.";}
else {
echo "hata".mysql_error();}
mysql_select_db("kaydet") or die ("hata2");
mysql_query("drop table if exists form") or die ("hata3");
mysql_query("create table form(
isim varchar(30),
parola char(100) primary key,
mail text(150))") or die ("hata4");
mysql_query("insert into form (isim,parola,mail) values ('$_POST[isim]','$_POST[par]','$_POST[mail]')")
or die ("hata5".mysql_error());
mysql_close($baglan);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment