-
Notifications
You must be signed in to change notification settings - Fork 0
/
firma-santiye-ekle-kontrol.php
53 lines (42 loc) · 1.53 KB
/
firma-santiye-ekle-kontrol.php
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
<?php
session_start();
if(!isset($_SESSION["login"])){
?>
<meta http-equiv="refresh" content="0;URL=giris.php">
<?php
} else
{
?>
<!-- GİRİŞ KONTROL -->
<?php include("kafa.php") ?>
<?php include("menu.php") ?>
<?php include("kontrol/veritabani.php") ?>
<section id="content">
<?php
$firmaid=$_POST['firmaid'];
$santiyeadi=$_POST['santiyeadi'];
$ad=$_POST['ad'];
$soyad=$_POST['soyad'];
$adres=$_POST['adres'];
$ayarguncelle=$connection->query("insert into firma_santiyeler (santiyeadi,firmaid,ad,soyad,adres) values ('$santiyeadi','$firmaid','$ad','$soyad','$adres')") or die ("bir hata olustu...");
$vericek=$connection->query("select * from firma_santiyeler where firmaid='$firmaid' and ad='$ad' and soyad='$soyad' and santiyeadi='$santiyeadi'")->fetchAll(PDO::FETCH_ASSOC);
foreach ($vericek as $vcek)
{
$santiyeid=$vcek['id'];
}
$ayarguncelle=$connection->query("insert into santiyeler_hakedis (santiyeid) values ('$santiyeid')") or die ("bir hata olustu...");
$ayarguncelle=$connection->query("insert into santiyeler_teklif (santiyeid) values ('$santiyeid')") or die ("bir hata olustu...");
$ayarguncelle=$connection->query("insert into santiyeler_fatura (santiyeid) values ('$santiyeid')") or die ("bir hata olustu...");
if($ayarguncelle){
$durum="<h2>İşlem Başarılı</h2>";
}else{
$durum="<h2>Bir hata oluştu</h2>";
}
echo"$durum";
echo" <meta http-equiv=\"refresh\" content=\"0;url=firma-detay.php?id=$firmaid\"> ";
?>
</section>
</div>
<!-- GİRİŞ KONTROL -->
<?php include("ayak.php"); ?>
<?php } ?>