linkedin facebook linkedin facebook nod32

Data jadvaldagi ma’lumotni o`chirish bo`limini admin panelini yaratish usuli

Muallif: Mengliyev Sh.

Qo`shilgan sana: 2016-02-10

Data jadvaldagi ma’lumotni o`chirish bo`limini admin panelini yaratish usuli

Video darslik 

Biz quyidagi malumot_uchirish.php faylini yaratib olamiz buning uchun quyidagi kodni ko`chrib olamiz.

malumot_uchirish.php

<?php
include ("lock.php");
include ("baza.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Belgini o'chiridh saxifasi</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="690" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="main_border">
<tr>
<td class="left"> <p align=center> <b><i>Saytga ma'lumot  kiritish administrator bo`limi</i><b> </p></td>
</tr>
<tr>
<td><table width="690" border="0" cellspacing="0" cellpadding="0">
<tr>
<!--chapmenyuni include yo`rdamida chaqirib olish -->
<? include ("chapmenyu.php");  ?>     
<td valign="top">

<p><strong>Belgilangan belgini o'chirish  </strong></p>
<form action="uchirish.php" method="post">
<?

$result = mysql_query("SELECT title,id FROM data");     
$myrow = mysql_fetch_array($result);

do
{
printf ("<p><input name='id' type='radio' value='%s'><label> %s</label></p>",$myrow["id"],$myrow["title"]);
}

while ($myrow = mysql_fetch_array($result));
?>

<p> <input name="submit" type="submit" value="Ma`lumot bazadan o`chirish!!!"></p>

</form>


</td>
</tr>
</table></td>
</tr>
<tr>
<td class="left"><p align=center>Saytga ma'lumot  kiritish administrator quyi bo`limi</p></td>
</tr> 
</table>
</body>
</html>

data jadvaldagi ma’lumotni o`chirish bo`limi uchirish.php quyida php kodi keltirilgan.

uchirish.php

<?php
include ("lock.php");
include ("baza.php");
if (isset($_POST['id'])) {$id = $_POST['id'];}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Qayta ishlash</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="690" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="main_border">
<tr>
<td class="left"> <p align=center> <b><i>Saytga ma'lumot  kiritish administrator bo`limi</i><b> </p></td>
</tr>
<tr>
<td><table width="690" border="0" cellspacing="0" cellpadding="0">
<tr>
<!--chapmenyuni include yo`rdamida chaqirib olish -->
<? include ("chapmenyu.php");  ?>    
<td valign="top">

<?php
if (isset($id))
{
$result = mysql_query ("DELETE FROM data WHERE id='$id'");

if ($result == 'true') {echo "<p>Siz bazadan ma`lumotni o`chirishga ulgurdingiz!</p>";}
else {echo "<p>Siz bazadan malumotni o`chirishga ulgurmadingiz!</p>";}

 

}                
else

{
echo "<p>Tanlangan so'rov bazaga yuborilmadi. Adminstratorga xat yozing admin@tami.uz. <br> <strong>id xato:</strong></p>";
}



?>


</td>
</tr>
</table></td>
</tr>
<tr>
<td class="left"><p align=center>Saytga ma'lumot  kiritish administrator quyi bo`limi</p></td>
</tr>
</table>
</body>
</html>

578 marta o`qildi.

Foydalanuvchi ismi: dasturchilar.uz
Qo`shilgan sana: 2016-02-13

yaxshi

Foydalanuvchi ismi: сардор
Qo`shilgan sana: 2016-06-21

Кидрув тизим ишламади

Parol:
Eslab qolish.


Ro`yhatdan o`tish

testing

+998915878681

Siz o`z maxsulotingizni 3D reklama ko`rinishda bo`lishini xohlaysizmi? Unda xamkorlik qilamiz.

3D Reklama


Рейтинг@Mail.ru
Рейтинг@Mail.ru

Besucherzahler
счетчик посещений