slight refactoring

This commit is contained in:
Andreas Zweili 2017-02-05 14:54:30 +01:00
parent 91a3a34f09
commit f10d6255db
1 changed files with 14 additions and 12 deletions

View File

@ -5,6 +5,7 @@
<title>Registration</title>
<link rel="stylesheet" href="css/loginstyle.css" />
</head>
<body>
<?php
require('db.php');
@ -20,7 +21,8 @@ if (isset($_REQUEST['username'])){
$password = mysqli_real_escape_string($con,$password);
$trn_date = date("Y-m-d H:i:s");
$query = "INSERT into `users` (username, password, email, trn_date)
VALUES ('$username', '".md5($password)."', '$email', '$trn_date')";
VALUES ('$username', '".md5($password)."',
'$email', '$trn_date')";
$result = mysqli_query($con,$query);
if ($result) {
echo "<div class='form'>