forked from victormazeli/complaint_system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
register_complaint.php
37 lines (26 loc) · 875 Bytes
/
register_complaint.php
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
36
37
<?php
date_default_timezone_set("Africa/Lagos");
include ('includes/session.php');
include ('index.php');
if (isset($_POST['submit'])){
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$meternum=$_POST['meternum'];
$email=$_POST['email'];
$telnum=$_POST['telnum'];
$lga=$_POST['lga'];
$address=$_POST['address'];
$username=$_POST['username'];
$password=$_POST['password'];
$date = date("y:m:d h:i:s");
//$salt = $email;
//$hashed = md5($password . $salt);
$insert = "INSERT INTO `complainant` VALUES ('', '$fname', '$lname', '$email','$meternum', '$username', '$password', '$telnum', '$address','$lga', '$date', '')";
$log = "INSERT INTO `log` VALUES ('', '$username', 'Created Account', '$date', 'commplainant')";
if ($query = mysqli_query($conn, $insert)){
echo "$_SESSION['info']";
}
if ($query = mysqli_query($conn, $log)){
}
}
?>