= $post['title'] ?>
= nl2br($post['content']) ?>
query(" SELECT * FROM settings LIMIT 1 ")->fetch(PDO::FETCH_ASSOC); $posts = $pdo->query(" SELECT * FROM posts ORDER BY id DESC ")->fetchAll(PDO::FETCH_ASSOC); if(isset($_POST['register'])){ $fullname = $_POST['fullname']; $phone = $_POST['phone']; $count = $pdo->query(" SELECT COUNT(*) FROM lottery_users ")->fetchColumn(); $code = $count + 1; $insert = $pdo->prepare(" INSERT INTO lottery_users (fullname,phone,code) VALUES (?,?,?) "); $insert->execute([ $fullname, $phone, $code ]); $msg = "کد قرعه کشی شما: ".$code; } ?>
= nl2br($post['content']) ?>