Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('connect.php');
- if(isset($_POST['submit'])){
- $login = $_POST['login'];
- $name = $_POST['name'];
- $surname = $_POST['surname'];
- $password = $_POST['password'];
- $gender = $_POST['gender'];
- $email = $_POST['email'];
- if($connect->connect_error){
- die("Connection failed: ".$connect->connect_errno);
- } else {
- $connect->query("INSERT INTO `my_users`(`Imie`, `Nazwisko`, `login`, `password`, `Gender`, `email`) VALUES ('$name','$surname','$login','$password','$gender','$email')");
- }
- echo "User ".$login." added succesfully";
- echo '<form method="post">';
- echo '<input type="submit" name="back" value="Add another user">';
- echo '</form>';
- if (isset($_POST['back'])){
- header("Location: formularz.html");
- }
- } else {
- header("Location: formularz.html");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement