Вход Регистрация
Файл: html/gift.php
Строк: 24
<?php
require_once ('system/func.php');
require_once (
'system/header.php');
if (isset(
$_GET['id'])) {
    
$id abs(intval($_GET['id']));
} else {
    
$id = -1;
}

$footval "gifts";
auth(); // Закроем от неавторизированых
$result $mc->query("SELECT * FROM `users` WHERE `id` = '$id'");
$gift $mc->query("SELECT * FROM `gifts` ");
$profil $result->fetch_array(MYSQLI_ASSOC);
echo 
$user['name'];
print 
"<center>  Подарок для " $profil['name'] . " </center>";
if(isset(
$_POST['text'])&&$text $_POST['text'])
if (isset(
$_POST['text']) && isset($profil['id'])) {
    
$mc->query("INSERT INTO `gifts`("
            
"`id`,"
            
"`text`,"
            
"`id_1`,"
            
"`id_2`,"
            
"`id_img`,"
            
"`name`"
            
") VALUES ("
            
"'NULL',"
            
"'" $_POST['text'] . "',"
            
"'" $user['name'] . "',"
            
"'" $profil['id'] . "',"
            
"'1',"
            
"'NULL'"
            
")");
    
?><script>showContent("/");</script><?php
} else {
    print 
"где-то ошибка бро!!";
}
?>
<form action="" method='post'>
    <center><input type="text" name='text' >
        <center><br><input type="submit" class="button" name='submit'>
            </form></center>
Онлайн: 1
Реклама