Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST['name']) && isset($_POST['nameto']) && isset($_POST['protec'])){
- $name = $_POST['name'];
- $nameto = $_POST['nameto'];
- $protec = $_POST['protec'];
- $db_host = "";
- $db_user = "";
- $db_password = "";
- $db_base = '';
- $db_table = "";
- $mysqli = new mysqli($db_host,$db_user,$db_password,$db_base);
- if ($mysqli->connect_error) {
- die('Ошибка : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);
- }
- $result = $mysqli->query("INSERT INTO ".$db_table." (name,nameto,protec) VALUES ('$name','$nameto','$protec')");
- if ($result == true){
- echo "Успешно!";
- }else{
- echo "Ошибка!";
- }
- }
- ?>
- <form method="POST" action="send.php" id="test">
- <input type="name" required />
- <input type="text" name="nameto" required />
- <input type="url" name="protec" required />
- <input type="submit">
- </form>
Add Comment
Please, Sign In to add comment