Skip to content

Commit

Permalink
my scholars
Browse files Browse the repository at this point in the history
  • Loading branch information
tosuman committed Jun 16, 2022
1 parent 728b890 commit 281e295
Show file tree
Hide file tree
Showing 152 changed files with 55,461 additions and 0 deletions.
212 changes: 212 additions & 0 deletions SSregister.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
<?php
require_once "config.php";

$username = $password = $confirm_password = "";
$username_err = $password_err = $confirm_password_err = "";

if ($_SERVER['REQUEST_METHOD'] == "POST"){

// Check if username is empty
if(empty(trim($_POST["username"]))){
$username_err = "Username cannot be blank";
}
else{
$sql = "SELECT id FROM ssregister WHERE username = ?";
$stmt = mysqli_prepare($conn, $sql);
if($stmt)
{
mysqli_stmt_bind_param($stmt, "s", $param_username);

// Set the value of param username
$param_username = trim($_POST['username']);

// Try to execute this statement
if(mysqli_stmt_execute($stmt)){
mysqli_stmt_store_result($stmt);
if(mysqli_stmt_num_rows($stmt) == 1)
{
$username_err = "This username is already taken";
}
else{
$username = trim($_POST['username']);
}
}
else{
echo "Something went wrong";
}
}
}

mysqli_stmt_close($stmt);


// Check for password
if(empty(trim($_POST['password']))){
$password_err = "Password cannot be blank";
}
elseif(strlen(trim($_POST['password'])) < 5){
$password_err = "Password cannot be less than 5 characters";
}
else{
$password = trim($_POST['password']);
}

// Check for confirm password field
if(trim($_POST['password']) != trim($_POST['confirm_password'])){
$password_err = "Passwords should match";
}


// If there were no errors, go ahead and insert into the database
if(empty($username_err) && empty($password_err) && empty($confirm_password_err))
{
$name=$_POST['name'];
$phone =$_POST['phone'];
$org =$_POST['org'];

$sql = "INSERT INTO ssregister (username, password, name, phone, org) VALUES (?, ?, '$name','$phone', '$org')";
$stmt = mysqli_prepare($conn, $sql);
if ($stmt)
{
mysqli_stmt_bind_param($stmt, "ss", $param_username, $param_password);

// Set these parameters
$param_username = $username;
$param_password = password_hash($password, PASSWORD_DEFAULT);

// Try to execute the query
if (mysqli_stmt_execute($stmt))
{
header("location: sslogin.php");
}
else{
echo "Something went wrong... cannot redirect!";
}
}
mysqli_stmt_close($stmt);
}
mysqli_close($conn);
}

?>




<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<link rel="stylesheet" href="nav1.css">



<title>Registration form</title>
</head>
<body>
<nav>


</label>

<style>
a{
text-decoration:none;
}
</style>

<label class="logo"> <i class="fas fa-graduation-cap"></i>SCHOLARSERA</label>

<ul>

<li class="nav-item active">
<a class="" aria-current="page" href="home.php">Home</a>
</li>

<li><a class="active" href="ssregister.php#"> <i class=""></i> Submit scholarship </a></li>

<li class="nav-item active">
<a class="" aria-current="page" href="college_list.php">Colleges</a>
</li>

<li><a class="" aria-current="page" href="sholarships.php">Scolarships</a></li>

<li class="nav-item">
<a class="" aria-current="page" href="WLcontact.php">Contact us</a>
</li>

</ul>

</nav>

<!--end nav-->

<div class="container mt-4 py-5">
<h3><b>Submit A Scholarship</b></h3>
<p>Got a scholarship you would like to list on the internet's premiere college and scholarship search site? Quickly and easily submit your scholarship online using our simple scholarship submission form. Just create an account by answering a few questions below. Once you have registered with SCHOLARSERA, you will be able to log-in and list, review and update your scholarships all in one place!</p>
<hr>
<p>If you already have scholarship(s) listed on SCHOLARSERA, please <a href="sslogin.php">click here</a> to log in.</p>
<form action="" method="post">
<div class="">
<div class="form-group">
<label for="inputEmail4">Name :</label>
<input type="text" class="form-control" name="name" id="inputEmail4" placeholder="" required="">
</div>
<div class="form-group">
<label for="inputEmail4">Email :</label>
<input type="text" class="form-control" name="username" id="inputEmail4" placeholder="" required="">
</div>
<div class="form-group">
<label for="inputEmail4">Phone Number :</label>
<input type="text" class="form-control" name="phone" id="inputEmail4" placeholder="" required="">
</div>
<div class="form-group">
<label for="inputEmail4">Organization Name :</label>
<input type="text" class="form-control" name="org" id="inputEmail4" placeholder="" required="">
</div>
<div class="form-group">
<label for="inputPassword4">Password</label>
<input type="password" class="form-control" name ="password" id="inputPassword4" placeholder="" required="">
</div>
</div>
<div class="form-group">
<label for="inputPassword4">Confirm Password</label>
<input type="password" class="form-control" name ="confirm_password" id="inputPassword" placeholder="" required="">
</div>

<form ... onsubmit="return checkForm(this);">

<p><input type="checkbox" required name="terms"> <u>Please verify your information before opening an account</u></p>
<p><input type="submit" class="btn btn-success"></p>
</form>
</form>
</div>
<div class="" style="background-color: #e3f2fd;">
<footer class="py-2 mt-5">
<!--<ul class="nav justify-content-center border-bottom pb-3 mb-3">
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Home</a></li>
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Collage</a></li>
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">About</a></li>
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Contact us</a></li>
</ul>-->
<p class="text-center text-muted"></p>
<p class="text-center text-muted">©2022Group-D, Inc</p>
</footer>
</div>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
102 changes: 102 additions & 0 deletions WLcontact.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SCHOLARSERA</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<link rel="stylesheet" href="nav1.css">
</head>
<body>
<nav>
</label>
<style>
a{
text-decoration:none;
}
</style>
<label class="logo"> <i class="fas fa-graduation-cap"></i>SCHOLARSERA</label>
<ul>
<li class="nav-item">
<a class="" aria-current="page" href="college_list.php">Colleges</a>
</li>
<li class="nav-item">
<a class="" aria-current="page" href="sholarships.php">Scolarships</a>
</li>
<li class="nav-item">
<a class="" aria-current="page" href="WLcontact.php">Contact us</a>
</li>
<li class="nav-item">
<a class="" aria-current="page" href="ssregister.php">Submit a Scholarship</a>
</li>
<li class="nav-item">
<a class="" aria-current="page" href="login.php">Login</a>
</li>
</ul>
</nav>
<!--end nav-->
<!--end nav-->
<div class = "jumbotron big-banner">
<section class="my-5"><!--mergin-->
<div class="py-5"><!--padding-->
<h2 class="text-center">Contact us</h2>
</div>
<div class="w-50 m-auto">
<form action="userinfo.php" method="post">
<div class="form-group">
<label>Name</label>
<input type="text" name="user" autocomplete="off" class="form-control" placeholder="Enter name">
</div>
<div class="form-group">
<label>Email</label>
<input type="text" name="email" autocomplete="off" class="form-control" placeholder="Enter email">
</div>
<div class="form-group">
<label>Phone Number</label>
<input type="text" name="mobile" autocomplete="off" class="form-control" placeholder="Enter phone no..">
</div>
<div class="form-group">
<label>Feedback</label>
<textarea class="form-control" name="comments" placeholder=""></textarea>
<div class="py-3">
<button type="submit" class="btn btn-success ">Submit</button>
</div>
</div>
</form>
</div></div>
<div class="" style="background-color: #e3f2fd;">
<footer>
<p class="p-3 text-center"><b>©2022Group-D, Inc</b></p>
</footer>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Xe+8cL9oJa6tN/veChSP7q+mnSPaj5Bcu9mPX5F5xIGE0DVittaqT5lorf0EI7Vk"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-kjU+l4N0Yf4ZOJErLsIcvOU2qSb74wXpOhqTvwVx3OElZRweTnQ6d31fXEoRD1Jy"
crossorigin="anonymous"></script>
</body>
</html>
62 changes: 62 additions & 0 deletions admin/add_course.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title></title>
</head>
<body>
<h1 style="color:blue; text-align: center; " >Update Course Name</h1>
<div class="container my-5">
<form action="add_course_info.php" method="POST">
<div class="form-group">
<label for="Course Name" class="form-label">Course Name:</label>
<input type="text" class="form-control" placeholder="" name="courses">
</div>
<div class="form-group">
<label for="pwd" class="form-label">Duration:</label>
<input type="text" class="form-control" placeholder="" name="duration">
</div>
<div class="form-group">
<label for="pwd" class="form-label">Course level:</label>
<input type="text" class="form-control" placeholder="" name="clevel">
</div>
<div class="form-group">
<label for="tol" class="form-label">Total Tuition Fees:</label>
<input type="text" class="form-control" placeholder="" name="t_tuition_fees">
</div>
<div class="form-group">
<label for="ad" class="form-label">Eligibility:</label>
<input type="text" class="form-control" placeholder="" name="eligibility">
</div>
<div class="form-group">
<label for="ad" class="form-label">Link:</label>
<input type="text" class="form-control" placeholder="" name="wlink">
</div>
<form ... onsubmit="return checkForm(this);">
<p><input type="checkbox" required name="terms"> <u>Please verify your information before submit</u></p>
<p><input type="submit" class="btn btn-primary"></p>
</form>
</form>
</div>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
-->
</body>
</html>
Loading

0 comments on commit 281e295

Please sign in to comment.