Почему, когда я пишу этот код, я не получу информацию в своей базе данных? Я думаю, что проблема в части PHP и объясните, потому что я хочу учиться.phpmyadmin information in pdo
<html>
<head></head>
<body>
<?php
$dsn = 'mysql:dbname=MYDBMANEHERE;host=MYDBHOSTHERE';
$user = 'u486645433_root';
$password = 'savtaester';
$dbh = new PDO($dsn, $user, $password);
if(isset($_POST['submit'],$_POST['question'],$_POST['sujet'])){
$username = $_POST['sujet'];
$password = $_POST['question'];
$stmt = $dbh->exec('INSERT INTO `u486645433_membr`.`posta` (`sujet`, `question`, `id`) VALUES ('.$username.', '.$password.', NULL);');
}
?>
<div style="width: 100%; height: 15%; background-color: rgb(106, 218, 111); position: absolute; left: 0px; top: 0px;" class="jumbotron">
<input placeholder="search" style="position: absolute; width: 20%; height: 62%; top: 20%; font-size: 27px; font-family: ar essence; left: 25%;" type="text">
<input value="home" name="lien1" onclick="self.location.href='index.php'" style="width: 15%; font-size: 30px; font-family: ar essence; position: absolute; top: 20%; height: 60%; left: 60%;" type="button">
</div>
<div style="width: 50%; background-color: rgb(199, 255, 202); position: absolute; left: 25%; top: 20%; height: 30%;" class="jumbotron">
<form action="lien.php" method="POST">
<input placeholder="sujet" name="sujet" style="position: absolute; width: 50%; height: 16%; top: 10%; font-size: 175%; font-family: ar essence; left: 25%;" type="text">
<textarea placeholder="question" name="question" style="position: absolute; width: 50%; height: 45%; top: 29%; font-size: 175%; font-family: ar essence; left: 25%;" type="text"></textarea>
<input value="Submit" name="submit" style="width: 21%; font-size: 150%; font-family: ar essence; height: 10%; left: 39%; top: 74%; position: absolute;" type="submit">
</form>
</div>
</body></html>
Пожалуйста, исправить ваш вопрос. У вас есть множество опечаток ... Кроме того, объясните свою проблему немного больше. Вы получаете какие-либо ошибки? Трудно прочитать ваш код, когда все красное. – FirstOne