コード例 #1
0
ファイル: test.php プロジェクト: RishabhJain96/RoboWebProj
});
/*
$orderID = 13;
$username = "******";
$controller = new financeController();

$orderslist = $controller->getOrdersList($orderID);
print_r($orderslist);
*/
$controller = new register();
echo "i got here";
$username = "******";
// old password is md5'd to allow checking with db
$oldpassword = md5("twist");
echo "\noldpassword="******"joke";
//if($username == "")
//{
//	echo "<p>Please complete all fields and try again.</p>";
//	//exit("Please complete all fields and try again.");
//}
//
if ($controller->getPassword($username) != $oldpassword) {
    echo "<p>Your old password is incorrect.</p>";
    //exit("Your old password is incorrect.");
} else {
    $controller->setPassword($username, $newpassword);
    echo "<p>Successfully changed password</p>";
}