linkedin facebook linkedin facebook nod32

Chap menyuni ma’lumot qo`shish bo`limining admin panelini yaratish usuli

Muallif: Mengliyev Sh.

Qo`shilgan sana: 2016-02-09

Chap menyuni ma’lumot qo`shish bo`limining admin panelini yaratish usuli

Video darslik 

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

chap_yangilash.php

<? include ("lock.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>Guruxga yangi saxifa qo'shish</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">
<form name="form1" method="post" action="chap_yuborish.php">
<p>
<label>Chap menyu nomini kiriting<br>
<input name="title" type="text" id="title" size="75">
</label>
</p>
<p>
<label>
<input type="submit" name="submit" id="submit" value="Bazaga yuborish">
</label>
</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>
Malumotni chapmenyu jadvalga yuborish bo`limi chap_yuborish.php quyida php kodi keltirilgan.

chap_yuborish.php

<?php
include ("lock.php");
include ("baza.php");
if (isset($_POST['title']))      
{
$title = $_POST['title'];
if ($title == '')
{
unset($title);

}
?>
<!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>Ishlov berish</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($title))
{
$result = mysql_query ("INSERT INTO chap (title) VALUES ('$title')");
if ($result == 'true') {echo "<p>Sizning ma`lumotingiz bazaga kiritildi!</p>";}
else {echo "<p>Sizning ma`lumotingiz bazaga kiritilmadi!</p>";}
}                
else
{
echo "<p>Sizning ma`lumotingiz bazaga kitilmadi kiritishda xato bor tekshirib ko'ring.</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>

Qo`shilgan ma’lumot chap menyuga qo`shiladi.

382 marta o`qildi.

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
счетчик посещений