-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/bdngeorge/itws-term-project
- Loading branch information
Showing
30 changed files
with
356 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,55 @@ | ||
<?php | ||
include("../includes/dbconnect.inc.php"); | ||
// redirect to login page if not logged in | ||
session_start(); | ||
if(!isset($_SESSION['userEmail'])){ | ||
header("Location: login.php"); | ||
exit(); | ||
} | ||
|
||
?> | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta charset="utf-8"> | ||
<title>TextbookBuddy - Account </title> | ||
<link rel="stylesheet" href="../styles/general.css"> | ||
<link rel="stylesheet" href="../styles/catalog.css"> | ||
<link rel="stylesheet" href="../styles/account.css"> | ||
</head> | ||
<h1> Welcome <?php echo $_SESSION['userEmail']; ?></h1> | ||
|
||
|
||
<!-- show all books user sold --> | ||
<a href="sellerCatalog.php"> My books </a> <br> | ||
<!-- option to delete books --> | ||
<body> | ||
<?php include("../includes/header2.inc.php"); ?> | ||
<div class = "center-text "> | ||
<h1> Account Information </h1> | ||
</div> | ||
<?php | ||
if($dbOK) { | ||
$userEmail = mysqli_real_escape_string($db, $_SESSION['userEmail']); | ||
$query = "SELECT * FROM users WHERE email = '$userEmail'"; | ||
$result = $db->query($query); | ||
$record = $result->fetch_assoc(); | ||
|
||
<!-- show all books users requested --> | ||
$fname = $record['fname']; | ||
$lname = $record['lname']; | ||
|
||
echo '<div id = "outer">' ; | ||
echo '<div id = "middle">'; | ||
echo '<strong>Name: </strong>'.$fname." "; | ||
echo $lname; | ||
echo '<br>'; | ||
echo '<strong>Email: </strong>'.$userEmail; | ||
echo '</div>'; | ||
} | ||
?> | ||
<div id = "sellerlog"> | ||
<!-- show all books user sold --> | ||
<a href="sellerCatalog.php"> My books </a> <br> | ||
<!-- logout --> | ||
<a href="logout.php">Logout</a> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
<!-- logout --> | ||
<a href="logout.php">Logout</a> | ||
|
||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.