Show sourcecode
The following files exists in this folder. Click to view.
webbserverprogrammering/projekt/snake_oil_seller/php/
about_us.php
add_to_cart.php
admin.php
buy_cart.php
config.php
contact.php
create_products.php
create_tables.php
createtable.php
dbconnection.php
delete_post.php
delete_tables.php
deletepost.php
deletetable.php
entry.php
header.php
insert_posts.php
insertposts.php
leaderboard.php
log_in.php
log_out.php
main.php
my_account.php
question_maker.php
quiz_form.php
quiz_list.php
quiz_maker.php
result.php
select_posts.php
selectposts.php
shop.php
shop_item.php
shopping_cart.php
sign_in.php
title_card.php
update_posts.php
updateposts.php
user_verified.php
verify_page.php
user_verified.php
46 lines UTF-8 Windows (CRLF)
<?php
// Sätt sessionens livslängd
session_set_cookie_params(60*60*24*30);
session_start();
/** @var PDO $dbconn */
include("dbconnection.php");
// Verifierar kontot
if (isset($_SESSION["username"])) {
$_SESSION["is_verified"] = "yes";
// Uppdatera i databasen
$stmt = $dbconn->prepare("UPDATE users SET is_verified = 'yes' WHERE username = ?");
$stmt->execute([$_SESSION["username"]]);
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Verification complete</title>
</head>
<body>
<h2>Your account is now verified.</h2>
<div id="outputText"></div>
<hr>
<script>
let timer = 2;
const interval = setInterval(function () {
if (timer > 0) {
document.getElementById("outputText").innerHTML =
"<h4>You will be sent to Snake Oil Seller in: " + timer + " seconds.</h4>";
timer--;
} else {
clearInterval(interval);
window.location = "main.php";
}
}, 1000);
</script>
</body>
</html>