-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregistration.php
More file actions
35 lines (30 loc) · 1.11 KB
/
registration.php
File metadata and controls
35 lines (30 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
session_start();
include("PFBC/Form.php");
if(isset($_POST["form"])) {
PFBC\Form::isValid($_POST["form"]);
include("model_db.inc.php");
$model_db->query("INSERT INTO users (mail, password) VALUES ('" . $_POST['mail'] . "', '" . md5($_POST["password"]) . "')");
header("Location: sign_in.php");
exit();
}
include("header.php");
$active = "registration.php";
include('navigation.php');
echo $navigation;
$form = new PFBC\Form("registration");
$form->configure(array(
"prevent" => array("bootstrap", "jQuery", "focus")
));
$form->addElement(new PFBC\Element\HTML('<legend>Registrace</legend>'));
$form->addElement(new PFBC\Element\Hidden("form", "registration"));
$form->addElement(new PFBC\Element\Email("Email:", "mail", array("required" => 1)));
$form->addElement(new PFBC\Element\Password("Heslo:", "password", array("required" => 1)));
$form->addElement(new PFBC\Element\Button("Registrovat"));
$form->addElement(new PFBC\Element\Button("Zpět", "button", array(
"onclick" => "history.go(-1);"
)));
$form->render();
?>
jeste již zaregistrován, <a href="sign_in.php">přihlašte se</a>
<?php include("foot.php");