Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $pass = $_POST['password'];
- $pass2 = $_POST['cpass'];
- $user = $_POST['username'];
- if(!defined('INCLUDE_CHECK')) die('You are not allowed to execute this file directly');
- $con = mysql_connect('localhost','antonio_sp1','sp1') or die('Unable to establish a DB connection');
- if ($_POST['password'] != mysql_query('SELECT pass FROM users'))
- {
- die('You\'re password isn\'t correct.');
- }
- else if (!isset($_POST['password']))
- {
- die('Please enter the password.');
- }
- else if (!isset($_POST['cpass'])
- {
- die('Enter a new password');
- }
- else
- mysql_query('UPDATE users SET pass="$pass2" WHERE usr="$user"', $con)
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement