Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if(isset($_POST['submit'])){
- $username = htmlspecialchars(trim($_POST['username']));
- $password = htmlspecialchars(trim($_POST['password']));
- $repeatpassword = htmlspecialchars(trim($_POST['repeatpassword']));
- if($username&&$password){
- $password = md5($password);
- $connect = mysql_connect('pv','pv','pv');
- mysql_select_db('pv dsl poto');
- $log = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'");
- $rows = mysql_num_rows($log);
- if($rows==1){
- $_SESSION['username']=$username;
- header('Location: /index.php');
- exit();
- }else{
- header('Location:login123.php');
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement