tabi hocam örnek db veri girişi şu şekilde
https://prnt.sc/201rkd4 yani verileri text değildi id oluşturarak ekliyor
veri girişi php tarafı
<?php
@session_start();
if(!isset($_SESSION['usr'])){
header("Location: index.php");
die();
} ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Uygulama admin Paneli</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/dashboard.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Admin Panel</a>
</div>
<div class="navbar-collapse collapse">
<?php include('menu.php');?>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h2 class="page-header">Uygulama Admin Paneli</h2>
<h4 class="sub-header">Takım Ekle</h4>
<form class="form-horizontal" role="form" action="addtakimdb.php" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="CategorySelect" class="col-sm-2 control-label">Lig Seç</label>
<div class="col-sm-4">
<select name="ligid" id="ligid" required >
<?php
require 'db.php';
$result = mysqli_query($conn,"SELECT * FROM lig") ;
if (mysqli_num_rows($result) > 0) :
while ($row = $result->fetch_assoc()) {
$id = $row["id"];
$cname = $row["adi"];
?>
<option value="<?php echo $id;?>"><?php echo $cname;?></option>
<?php
}
endif;
?>
</select>
</div>
</div>
<div class="form-group">
<label for="Tag" class="col-sm-2 control-label">Takımlar:</label>
<div class="col-sm-4">
<textarea class="form-control" id="takimlist" name="takimlist" rows="10" cols="50"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-8">
<?php
if (isset($_REQUEST['add_cdata'])):
if(!empty($_REQUEST['add_cdata'])):
$add_cdata = $_GET['add_cdata'];
if('empty'==$add_cdata):
?>
<div style="line-height: 1.7em;color:red;">Boş Kısım bırakmayın lütfen</div>
<?php
endif;
if('success'==$add_cdata):
?>
<div style="line-height: 1.7em;color:green;">Başarıyla Eklendi!</div>
<?php
endif;
if('failed'==$add_cdata):
?>
<div style="line-height: 1.7em;color:red;">Hata!!</div>
<?php
endif;
endif;
endif;
?>
<button type="submit" class="btn btn-default">Ekle</button>
</div>
</div>
</form>
<h4 class="sub-header">Takımlar</h4>
<div class="col-sm-9 col-md-8 main">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>Adı</th>
<th>Lig</th>
<th>İşlemler</th>
</tr>
</thead>
<tbody>
<?php
require 'db.php';
$result = mysqli_query($conn,"SELECT * FROM takim ORDER BY ligid DESC") ;
if (mysqli_num_rows($result) > 0) :
while ($row = $result->fetch_assoc()) {
$id = $row["id"];
$adi = $row["takimadi"];
$ligid = $row["ligid"];
$result_pcat = mysqli_query($conn,"SELECT * FROM lig where id=".$ligid) ;
$data_pcat = mysqli_fetch_assoc($result_pcat);
$pcat = $data_pcat['adi'];
?>
<tr>
<td><?php echo $id;?></td>
<td><?php echo $adi;?></td>
<td><?php echo $pcat;?></td>
<td> <a href="edittakim.php?qid=<?php echo $id?>"><img border="0" src="edit.png" width="20" height="20"></a> 
<a href="deletetakim.php?cid=<?php echo $id?>"><img border="0" src="delete.png" width="20" height="20"></a></a></td>
</tr>
<?php } endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
Paylaştığınız sayfada herhangi bir UPDATE sorgusu yok. Veri ekleme işlemini addtakimdb.php dosyasında yapıyorsunuz. Form verileri oraya POST ediyor.
Dilerseniz özel mesaj yoluyla iletişime geçin yardımcı olayım. Ufak bir probleme benziyor