Compare commits

..

No commits in common. 'b54903e06e14d6559cf8968b803367f2e7a81a65' and 'e874ec2b7266a093c6a2566e7d065a477e9eacf3' have entirely different histories.

  1. 4
      contactus.php
  2. 6
      footer.php
  3. 2
      job_details.php
  4. 18
      jobseekerprofile.php
  5. 3
      register.php
  6. 7
      updateemployeeprofile.php
  7. 8
      updateprofile.php
  8. 34
      uploadfeedback.php

@ -16,7 +16,7 @@
<div class="card-body"> <div class="card-body">
<h3 class="text-2xl font-bold text-center mb-4">Please provide the feedback about your problem</h3> <h3 class="text-2xl font-bold text-center mb-4">Please provide the feedback about your problem</h3>
<form class="space-y-4" method="POST" action="uploadfeedback.php" > <form class="space-y-4">
<div class="form-control"> <div class="form-control">
<label class="label"> <label class="label">
<span class="label-text">Your Name</span> <span class="label-text">Your Name</span>
@ -39,7 +39,7 @@
</div> </div>
<div class="form-control mt-6"> <div class="form-control mt-6">
<button class="btn btn-primary" name="submit" >Send Message</button> <button class="btn btn-primary">Send Message</button>
</div> </div>
</form> </form>
</div> </div>

@ -10,12 +10,12 @@
<footer> <footer>
<div class="quicklinks "> <div class="quicklinks ">
<ul> <ul>
<li><a href="aboutus">About Us</a></li> <li><a href="#">About Us</a></li>
<li><a href="contactus">Contact</a></li> <li><a href="#">Contact</a></li>
<li><a href="#">Privacy Policy</a></li> <li><a href="#">Privacy Policy</a></li>
</ul> </ul>
<ul> <ul>
<li><a href="">Jobs</a></li> <li><a href="#">Jobs</a></li>
<li><a href="#">Companies</a></li> <li><a href="#">Companies</a></li>
<li><a href="#">Support</a></li> <li><a href="#">Support</a></li>
</ul> </ul>

@ -3,7 +3,7 @@ session_start();
// Check if the user is logged in // Check if the user is logged in
if (!isset($_SESSION['email'])) { if (!isset($_SESSION['email'])) {
header("Location: login"); header("Location: login.php");
exit(); exit();
} }
// Check if seeker_id exists in the session // Check if seeker_id exists in the session

@ -15,7 +15,7 @@ $user_id = $_SESSION['user_id']; // Get user ID from the session
// Fetch user data from the database // Fetch user data from the database
$query = "SELECT u.firstname, u.lastname, u.email, u.phone,u.username, $query = "SELECT u.firstname, u.lastname, u.email, u.phone,
j.skills, j.experience, j.education, j.location j.skills, j.experience, j.education, j.location
FROM users u FROM users u
LEFT JOIN job_seekers j ON u.user_id = j.user_id LEFT JOIN job_seekers j ON u.user_id = j.user_id
@ -101,27 +101,13 @@ if ($result->num_rows > 0) {
> >
</div> </div>
<!-- username -->
<div class="form-control">
<label class="label">
<span class="label-text">username</span>
</label>
<input
type="text"
name="username"
value="<?php echo isset($user['username']) ? htmlspecialchars($user['username']) : ''; ?>"
class="input input-bordered w-full"
required
>
</div>
<!-- Phone --> <!-- Phone -->
<div class="form-control"> <div class="form-control">
<label class="label"> <label class="label">
<span class="label-text">Phone Number</span> <span class="label-text">Phone Number</span>
</label> </label>
<input <input
type="number" type="tel"
name="phone" name="phone"
value="<?php echo isset($user['phone']) ? htmlspecialchars($user['phone']) : ''; ?>" value="<?php echo isset($user['phone']) ? htmlspecialchars($user['phone']) : ''; ?>"
class="input input-bordered w-full" class="input input-bordered w-full"

@ -116,8 +116,7 @@ if (isset($_POST['Login'])) {
header("Location: index"); header("Location: index");
exit(); exit();
} else { } else {
echo "<script>alert('Incorrect email or password.'); window.location.href = 'login';</script>"; echo "Incorrect email or password.";
exit();
} }
} }
?> ?>

@ -18,7 +18,7 @@ if (isset($_POST['update'])) {
$username = trim($_POST['username']); $username = trim($_POST['username']);
$address = trim($_POST['address']); $address = trim($_POST['address']);
try { try {
$conn->begin_transaction(); $conn->begin_transaction();
@ -32,7 +32,6 @@ if (isset($_POST['update'])) {
} }
$stmt_users->bind_param("sssssi", $first_name, $last_name, $email, $phone, $username,$user_id); $stmt_users->bind_param("sssssi", $first_name, $last_name, $email, $phone, $username,$user_id);
if (!$stmt_users->execute()) { if (!$stmt_users->execute()) {
throw new Exception("Error updating users table: " . $stmt_users->error); throw new Exception("Error updating users table: " . $stmt_users->error);
} }
@ -76,8 +75,8 @@ if (isset($_POST['update'])) {
} }
$conn->commit(); $conn->commit();
echo "<script>alert('Profile updated successfully! Relogin to see the changes'); window.location.href = 'login';</script>"; $_SESSION['success_message'] = "Profile updated successfully!";
header("Location: employerprofile");
exit(); exit();
} catch (Exception $e) { } catch (Exception $e) {

@ -14,7 +14,6 @@ if (isset($_POST['update'])) {
$first_name = trim($_POST['first_name']); $first_name = trim($_POST['first_name']);
$last_name = trim($_POST['last_name']); $last_name = trim($_POST['last_name']);
$email = trim($_POST['email']); $email = trim($_POST['email']);
$username = trim($_POST['username']);
$phone = trim($_POST['phone']); $phone = trim($_POST['phone']);
$skills = trim($_POST['skills']); $skills = trim($_POST['skills']);
$experience = trim($_POST['experience']); $experience = trim($_POST['experience']);
@ -26,13 +25,13 @@ if (isset($_POST['update'])) {
// 1. First update the users table // 1. First update the users table
$query_users = "UPDATE users $query_users = "UPDATE users
SET firstname = ?, lastname = ?, email = ?, phone = ? ,username =? SET firstname = ?, lastname = ?, email = ?, phone = ?
WHERE user_id = ?"; WHERE user_id = ?";
$stmt_users = $conn->prepare($query_users); $stmt_users = $conn->prepare($query_users);
if (!$stmt_users) { if (!$stmt_users) {
throw new Exception("Prepare failed for users table: " . $conn->error); throw new Exception("Prepare failed for users table: " . $conn->error);
} }
$stmt_users->bind_param("sssssi", $first_name, $last_name, $email, $phone,$username, $user_id); $stmt_users->bind_param("ssssi", $first_name, $last_name, $email, $phone, $user_id);
if (!$stmt_users->execute()) { if (!$stmt_users->execute()) {
throw new Exception("Error updating users table: " . $stmt_users->error); throw new Exception("Error updating users table: " . $stmt_users->error);
@ -82,7 +81,8 @@ if (isset($_POST['update'])) {
} }
$conn->commit(); $conn->commit();
echo "<script>alert('Profile updated successfully! relogin to see the changes'); window.location.href = 'login';</script>"; $_SESSION['success_message'] = "Profile updated successfully!";
header("Location: jobseekerprofile.php");
exit(); exit();
} catch (Exception $e) { } catch (Exception $e) {

@ -1,34 +0,0 @@
<?php
session_start();
include 'connect.php';
if(!isset($_SESSION['email'])){
header("Location: login");
exit();
}
$user_id = $_SESSION['user_id'];
if(isset($_POST['submit'])){
$username = trim($_POST['name']);
$email = trim($_POST['email']);
$feedback = trim($_POST['message']);
$stmt = $conn->prepare(
"INSERT INTO feedback (user_id,name,email,feedback)
VALUES (?, ?, ?, ?)"
);
$stmt->bind_param(
"isss",
$user_id,
$username,
$email,
$feedback
);
$stmt -> execute();
echo "<script>alert('feedback posted successfully!'); window.location.href = 'index';</script>";
exit;
}
?>
Loading…
Cancel
Save