Show sourcecode
The following files exists in this folder. Click to view.
webbserverprogrammering/exercises/quiz/
admin.php
dbconnection.php
glömtLösen.php
index.php
quiz.php
quiz_css.css
rättning.php
skapaTabell.php
verify.php
verify.php
36 lines UTF-8 Windows (CRLF)
<!DOCTYPE html>
<html lang="sv">
<head>
<meta charset="utf-8" />
<title>Epostverifiering</title>
<link rel="stylesheet" type="text/css" href="quiz_css.css">
</head>
<body>
<?php
include ('dbconnection.php');
$anv = $_POST["anv"];
$epost = $_POST["epost"];
try {
# prepare
$sql = "UPDATE QUIZAnvändare SET epost=?
WHERE användarnamn=?";
$stmt = $dbconn->prepare($sql);
# the data we want to insert
$data = array($epost, $anv);
# execute width array-parameter
$stmt->execute($data);
$message = "<br/>Record updated successfully.<br />";
}
catch(PDOException $e)
{
$message .= $sql . "<br>" . $e->getMessage();
}
echo "$message";
?>
Välkommen till quizet!<br>
Din e-post är nu bekräftad<br>
<a href="index.php">Logga in</a>
</body>
</html>