Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include_once("test.php");
- $senha = filter_input(INPUT_POST, 'senha', FILTER_SANITIZE_STRING);
- //echo "senha: $senha <br>";
- $result_senha = "INSERT INTO senha (senha) VALUES ('$senha', NOW())";
- $resultado_usuario = mysqli_query($conn, $result_senha);
- if(mysqli_insert_id($conn)){
- $_SESSION['msg'] = "<p style='color:green;'>Usuário cadastrado com sucesso</p>";
- header("Location: index.php");
- }else{
- $_SESSION['msg'] = "<p style='color:red;'>Usuário não foi cadastrado com sucesso</p>";
- header("Location: index.php");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement