Skip to content

Commit 6594884

Browse files
committed
ToDoploy_RemovedPHP
1 parent 739931e commit 6594884

5 files changed

Lines changed: 11 additions & 112 deletions

File tree

homepage/homepage.html

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
<?php
21

3-
session_start();
4-
include("../loginpage/connection.php");
5-
include("../loginpage/functions.php");
6-
7-
$user_data = check_login($con);
8-
9-
?>
102
<!DOCTYPE html>
113
<html lang="en">
124
<head>
@@ -67,7 +59,7 @@
6759
</ul>
6860
<!-- My Account button -->
6961
<div class="myAccount">
70-
<a href=".././myaccount/account.php"><button type="button" class="btnC"><i class="bi bi-person-circle"></i>&nbsp;&nbsp;My Account</button></a>
62+
<a href=".././myaccount/account.html"><button type="button" class="btnC"><i class="bi bi-person-circle"></i>&nbsp;&nbsp;My Account</button></a>
7163
</div>
7264
</div>
7365
</nav>
@@ -194,7 +186,7 @@ <h1 class="sectionHeader">contact us</h1>
194186

195187
<div class="contact-body">
196188
<div class="contactForm">
197-
<form action="connect.php" method="post" class="form-body">
189+
<form action="connect.html" method="post" class="form-body">
198190
<h1 class="sub-heading">Need Support !</h1>
199191
<p class="para para2">Contact us for a quote , help to join the them.</p>
200192
<input type="text" class="input" placeholder="your name" value="<?php echo $user_data['f_name'].' '.$user_data['l_name']?>">

loginpage/functions.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
<?php
22

3-
function check_login($con){
3+
function check_login($con)
4+
{
45

5-
if(isset($_SESSION['email'])){
6+
if (isset($_SESSION['email'])) {
67

78
$email = $_SESSION['email'];
89
$query = "select * from user where email = '$email' limit 1";
910

10-
$result = mysqli_query($con,$query);
11-
if($result && mysqli_num_rows($result) > 0){
11+
$result = mysqli_query($con, $query);
12+
if ($result && mysqli_num_rows($result) > 0) {
1213
$user_data = mysqli_fetch_assoc($result);
1314
return $user_data;
1415
}
1516
}
1617

1718
//redirect to login
18-
header("location: ../loginpage/login.php");
19+
header("location: ../loginpage/login.html");
1920
die;
2021
}
21-
22-
23-
?>

myaccount/account.html

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
<?php
2-
3-
session_start();
4-
include("../loginpage/connection.php");
5-
include("../loginpage/functions.php");
6-
7-
$user_data = check_login($con);
8-
9-
if($_SERVER['REQUEST_METHOD']=="POST"){
10-
11-
//something post
12-
$email = $user_data['email'];
13-
$f_name = $_POST['f_name'];
14-
$l_name = $_POST['l_name'];
15-
$phone_number = $_POST['phone_number'];
16-
$password = $_POST['password'];
17-
$birthday = $_POST['birthday'];
18-
$country = $_POST['country'];
19-
20-
21-
if(!empty($email) && !empty($f_name) && !empty($l_name) && !empty($phone_number) && !empty($password)){
22-
23-
//save to db
24-
$query = "update user set f_name='$f_name',l_name='$l_name',phone_number='$phone_number',password='$password',country='$country',birthday='$birthday' where email='$email'";
25-
mysqli_query($con,$query);
26-
header("location: ../myaccount/account.php");
27-
die;
28-
}else{
29-
echo "enter valid information";
30-
}
31-
}
32-
33-
?>
34-
351

362
<!DOCTYPE html>
373
<html lang="en">
@@ -51,7 +17,7 @@
5117

5218
<form action="" method="POST">
5319

54-
<h4 class="font-weight-bold py-3 mb-2"><a href="../homepage/homepage.php"><img src="../images/Logo 2New.png" width="60" height="60"></a>
20+
<h4 class="font-weight-bold py-3 mb-2"><a href="../homepage/homepage.html"><img src="../images/Logo 2New.png" width="60" height="60"></a>
5521
Account details
5622
</h4>
5723
<div class="wrapper" >
@@ -131,7 +97,7 @@ <h6 class="mb-4">Contacts</h6>
13197
</div>
13298
<div class="text-right mt-3">
13399
<button type="submit" class="btn btn-primary">Save changes</button>&nbsp;
134-
<a href="../homepage/homepage.php"><button type="button" class="btn btn-secondary" >Cancel</button></a>
100+
<a href="../homepage/homepage.html"><button type="button" class="btn btn-secondary" >Cancel</button></a>
135101
</div>
136102
</form>
137103

registerpage/registerpage.html

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,3 @@
1-
<?php
2-
3-
session_start();
4-
include("../loginpage/connection.php");
5-
include("../loginpage/functions.php");
6-
7-
if($_SERVER['REQUEST_METHOD']=="POST"){
8-
9-
//something post
10-
$email = $_POST['email'];
11-
$f_name = $_POST['f_name'];
12-
$l_name = $_POST['l_name'];
13-
$phone_number = $_POST['phone_number'];
14-
$password = $_POST['password'];
15-
16-
if(!empty($email) && !empty($f_name) && !empty($l_name) && !empty($phone_number) && !empty($password)){
17-
18-
//save to db
19-
$query = "insert into user (f_name,l_name,email,phone_number,password) values ('$f_name','$l_name','$email','$phone_number','$password')";
20-
mysqli_query($con,$query);
21-
header("location: ../loginpage/login.php");
22-
die;
23-
}else{
24-
echo "enter valid information";
25-
}
26-
}
27-
?>
28-
29-
301
<!DOCTYPE html>
312
<html lang="en">
323

@@ -43,7 +14,7 @@
4314
<body>
4415
<div class="wrapper">
4516
<form action="" method="POST">
46-
<h1 class='font-weight-bold py-3 mb-2'><a href="../homepage/homepage.php"><img src="../images/Logo 2New.png" width="60" height="60"></a>&nbsp;Registration</h1>
17+
<h1 class='font-weight-bold py-3 mb-2'><a href="../homepage/homepage.html"><img src="../images/Logo 2New.png" width="60" height="60"></a>&nbsp;Registration</h1>
4718

4819
<div class="input-box">
4920
<div class="input-field">

ticketPage/ticketBuy.html

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,3 @@
1-
<?php
2-
3-
session_start();
4-
include("../loginpage/connection.php");
5-
include("../loginpage/functions.php");
6-
7-
if($_SERVER['REQUEST_METHOD']=="POST"){
8-
9-
//something post
10-
$name = $_POST['name'];
11-
$email = $_POST['email'];
12-
$date = $_POST['date'];
13-
$session = $_POST['session'];
14-
$ticket_type = $_POST['ticket_type'];
15-
$no_of_tickets = $_POST['no_of_tickets'];
16-
17-
if(!empty($name) && !empty($email) && !empty($date) && !empty($session) && !empty($ticket_type) && !empty($no_of_tickets)){
18-
19-
//save to db
20-
$query = "insert into ticket (name,email,date,session,ticket_type,no_of_tickets) values ('$name','$email','$date','$session','$ticket_type','$no_of_tickets')";
21-
mysqli_query($con,$query);
22-
header("location: ../ticketPage/ticketBuy.php");
23-
die;
24-
}else{
25-
echo "enter valid information";
26-
}
27-
}
28-
?>
291

302
<!DOCTYPE html>
313
<html lang="en">

0 commit comments

Comments
 (0)