Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
KLUGLUG
KL Hostel Outing Automation
Commits
ff54775b
Commit
ff54775b
authored
Mar 18, 2021
by
Srinivas
Browse files
Update stureg.php
parent
0bd804bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
stureg.php
View file @
ff54775b
<?php
<?php
session_start
();
session_start
();
include
(
'connection.php'
);
$connection
=
getdb
();
?>
?>
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en-ca"
>
<html
lang=
"en-ca"
>
...
@@ -174,8 +176,6 @@ if($_SESSION['username4']){
...
@@ -174,8 +176,6 @@ if($_SESSION['username4']){
<table>
<table>
<?php
<?php
$connection
=
mysqli_connect
(
"localhost"
,
"root"
,
""
);
$db
=
mysqli_select_db
(
$connection
,
'test'
);
if
(
isset
(
$_POST
[
'search'
]))
if
(
isset
(
$_POST
[
'search'
]))
{
{
...
@@ -189,17 +189,16 @@ $password = $_POST['user_pass'];
...
@@ -189,17 +189,16 @@ $password = $_POST['user_pass'];
$cpassword
=
$_POST
[
'user_pass1'
];
$cpassword
=
$_POST
[
'user_pass1'
];
if
(
$cpassword
==
$password
){
if
(
$cpassword
==
$password
){
$conn
=
new
mysqli
(
'localhost'
,
'root'
,
''
,
'test'
);
if
(
$connection
->
connect_error
){
if
(
$conn
->
connect_error
){
die
(
'Connection Failed : '
.
$connection
->
connect_error
);
die
(
'Connection Failed : '
.
$conn
->
connect_error
);
}
}
else
{
else
{
$stmt
=
$conn
->
prepare
(
"insert into student_login(username,Password)
$stmt
=
$conn
ection
->
prepare
(
"insert into student_login(username,Password)
values(?,?)"
);
values(?,?)"
);
$stmt
->
bind_param
(
"ss"
,
$username
,
$password
);
$stmt
->
bind_param
(
"ss"
,
$username
,
$password
);
$stmt
->
execute
();
$stmt
->
execute
();
$stmt
->
close
();
$stmt
->
close
();
$conn
->
close
();
$conn
ection
->
close
();
}
}
echo
"<script>location.href='success.php'</script>"
;
echo
"<script>location.href='success.php'</script>"
;
}
}
...
@@ -214,4 +213,4 @@ echo "<script>location.href='3.php'</script>";
...
@@ -214,4 +213,4 @@ echo "<script>location.href='3.php'</script>";
}
}
?>
?>
</body>
</body>
</html>
</html>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment