Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', '1');
- require_once ('DBBase.php');
- $code = $_GET["code"];
- echo $code;
- $inputusername = "pedro";
- $inputpassword = "homo";
- function updateCode() {
- $DB = new DBConn();
- $DB->update("users","userstate","'1'","username=" . $this->username);
- echo "koodi vaihdettu";
- }
- function checkVerification() {
- $asd = new DBConn();
- $result = $asd->select("username,password", "users", "userstate=" . $this->code);
- while ($row = mysqli_fetch_object($result)) {
- $username = $row->username;
- $password = $row->password;
- echo $username;
- echo $password;
- }
- if ($inputpassword == $password) && ($inputusername == $username) {
- updateCode();
- }
- else {
- echo "Väärä käyttäjätunnus ja/tai salasana";
- }
- }
- checkVerification();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement