INTERNET VA DASTURLASH
|
Sayt yaratishda yordam
|
Mavzu:
Turli xil kodlarda yordam
Mavzu fayllari
(2)
Bahh Tee, <? //php kod $javob = abs($_GET['javob']); $nomi = $_POST['nomi']; if (isset($_POST['submit'])) { $error = array(); if (empty($nomi)) { $error[] = 'Nomini yozmadingiz!'; } if (!$error) { mysql_query("INSERT INTO `ustun` SET `qator` = '".mysql_real_escape_string($nomi)."';"); Header('Location: '.$home.''); } else { echo functions::display_error($error, '<< <a href="'.$home.'/mod.php"> <b> Orqaga qaytish </b> </a>'); } } else { echo '<form action="'.$home.'/mod.php?savol='.$javob" method="post"> <div class="menu"> Nomi <br> <input type="text" name="nomi"> <br> <input type="submit" name="submit" value="Yuborish"> </div> </form>'; } //sql kod buni ham bir ko'rib bersangiz. Sqldan ko'ngil to'lmayapti. Xatolik yo'qmi DROP TABLE IF EXISTS `ustun`; CREATE TABLE `ustun` ( `id` int(11) NOT NULL AUTO_INCREMENT, `qator` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE = MyISAM DEFAULT CHARSET = utf8; ?>
Yuklab olish
Onlayn 365 (0/365)
Forumga a'zo bo'lish
Forumdan qidirish
Bosh sahifa