12345678910111213141516171819202122232425 |
- <?php
- $host = "blueris.beget.tech";
- $username = "blueris_base";
- $password = "Qwer123.";
- $database = "blueris_base";
- $mysql = new mysqli($host, $username, $password, $database);
- if($mysql->connect_error){
- die("Ошибка подключения". $mysql->connect_error);
- }
- $review = $_POST["review"];
- $name = $_POST["name"];
- $rating = $_POST["rating"];
- $query = "INSERT INTO review (name, review, rating) VALUES ('$name', '$review', '$rating')";
- $result = $mysql->query($query);
- if(!$result){
- echo "Что то не так" . $mysql->error;
- }
- else
- {
- echo "<script>window.location.href = 'index.php';</script>";
- }
- ?>
|