0% found this document useful (0 votes)
168 views39 pages

And Run Main - PHP Create Data Base in Mysql From Placementdb - SQL File

The document appears to be a table of contents or index for PHP files related to a college placement system. It lists over 25 PHP file names with brief descriptions. The files include ones for student login, admin login, creating jobs, applying for jobs, updating results, and more. The README at the bottom provides instructions on setting up the files and database in a local XAMPP environment.

Uploaded by

Man
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views39 pages

And Run Main - PHP Create Data Base in Mysql From Placementdb - SQL File

The document appears to be a table of contents or index for PHP files related to a college placement system. It lists over 25 PHP file names with brief descriptions. The files include ones for student login, admin login, creating jobs, applying for jobs, updating results, and more. The README at the bottom provides instructions on setting up the files and database in a local XAMPP environment.

Uploaded by

Man
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 39

Contents

main.php.....................................................................................................................................................2
admdash.php...............................................................................................................................................4
adminlogin.php...........................................................................................................................................6
AdmnJobResult.php....................................................................................................................................7
applyjob.php................................................................................................................................................8
check.php....................................................................................................................................................9
checkers.php.............................................................................................................................................10
chngpwd.php.............................................................................................................................................12
CreateJob.php...........................................................................................................................................13
dispStuList.php..........................................................................................................................................15
logout.php.................................................................................................................................................17
NewUser.php.............................................................................................................................................18
saveAppJob.php........................................................................................................................................19
savedata.php.............................................................................................................................................20
savepwd.php.............................................................................................................................................22
saveresult.php...........................................................................................................................................23
saveStu.php...............................................................................................................................................24
saveuser.php.............................................................................................................................................26
showdata.php............................................................................................................................................27
studash.php...............................................................................................................................................29
studetails.php............................................................................................................................................31
stulogin.php...............................................................................................................................................33
style.css.....................................................................................................................................................34
placementdb.sql........................................................................................................................................38

NOTE: Create the files with the names mentioned in a folder in xampp/htdocs
and run main.php

Create data base in mySQL from placementdb.sql file


main.php
<html>
<head>

</head>
<body>
<link href="style.css" rel="stylesheet" type="text/css">
<div class="container">
<div class="top-menu">
College Placement System
</div>
<div class="login-menu">
<a href="stulogin.php">Student Login</a>&nbsp&nbsp<a href="Adminlogin.php">Admin
Login</a>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</div>
<?php
$con=mysqli_connect("localhost","root","","placementdb");
$qry="select * from placement_tbl where expDate>'".date("Y-m-d")."'";

$run=mysqli_query($con,$qry);
while ($rows=mysqli_fetch_array($run))
{
echo "<div class=\"jobbox\">";
echo "<h3>".$rows['JobID'].". ".$rows['JobDesc']."</h3>"." <p><font color=red> Last
Date for Applying :".$rows['ExpDate']."</font></p>" ;
echo "<b>Company:</b>".$rows['CompanyName']."<br>";
echo "<b>Location:</b>".$rows['Location']."<br>";
echo "<b>Date of Interview:</b>".$rows['InterviewDate']."<br>";
echo "<b>Stream:</b>".$rows['Stream']."&nbsp&nbsp&nbsp&nbsp&nbsp <b>Salary
Package:</b>".$rows['SalPackage']."<br>";
echo "<b>Qualification:</b>".$rows['Qualification']."&nbsp&nbsp&nbsp&nbsp&nbsp
<b>Other Requirements:</b>".$rows['OtherReq']."<br>";
echo "</div>";
}

?>
</div>
</body>
</html>
admdash.php
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#newJob").click(function(){
$("#contents").load("CreateJob.php");
});
$("#newUser").click(function(){
$("#contents").load("NewUser.php");
});

$("#ChangePwd").click(function(){
$("#contents").load("chngpwd.php");
});
$("#UpdateRes").click(function(){
$("#contents").load("AdmnJobResult.php");
});
});
</script>
</head>
<body>
<link href="style.css" rel="stylesheet" type="text/css">
<div class="container">
<div class="top-menu">
College Placement System
</div>
<div class="login-menu">
<a href="logout.php"><?php session_start(); echo $_SESSION['username'];?
>&nbspLogout</a>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</div>
<div class="clearfix">
<div class="left-menu">
<div class="listItem"><a id="newJob" href="#"> Create a New Job</a></div>
<div class="listItem"><a id="newUser" href="#"> Add a New user</a></div>
<div class="listItem"><a id="ChangePwd" href="#">Change password</div>
<div class="listItem"><a id="UpdateRes" href="#">Update Result</div>
</div>
<div class="dataform" ">
<div class="form-data" id="contents" style=" box-shadow: 10px 10px lightgrey;">

</div>
</div>
</div>
</div>

</body>
</html>
adminlogin.php
<html>
<body>
<link href="style.css" rel="stylesheet" type="text/css">
<div class="container">
<div class="top-menu">
College Placement System
</div>
<form method="post" action="check.php">
<div class="loginblock"><center>
<font style="font-size:20px; font-weight:bold;"> Admin Login</font><br><br><br><br>
User Name:<input type="string" name="uname"><br><br>
Password:<input type="password" name="pwd"><br><br>
<input type="hidden" name="usertype" value="A">
<input type="submit" name="submit" name="submit"><br><br><br></center>
</div>
</form>
</div>
</body>
</html>
AdmnJobResult.php
<html>
<body>
<form method = "post" action="dispStuList.php" >
<table align="center" border="1" width="100%">

<th colspan="2"> Update Job Result</th>

<tr>
<td><div class="labl">Job: </div></td>
<td>
<?php
$con=mysqli_connect("localhost","root","","placementdb");
$qry="select JobID, JobDesc from placement_tbl";
$run=mysqli_query($con,$qry);
echo '<select name="jid">';
while ($rows=mysqli_fetch_array($run))
{

echo "<option value=".$rows['JobID'].">".$rows['JobDesc']."</option>";


}
?>

</td>
</tr>

<th colspan="2" style="background-color:#0055CC;" > <input type = "submit" name = "submit"


value="Students Applied" style="font-size:16px;font-weight:bold; padding:5px;color: #0055CC; text-
shadow: 2px 2px 4px orange;" > </th>
</table>

</form>
</body>
</html>
applyjob.php
<html>
<body>
<form method = "post" action="saveAppJob.php">
<table align="center" border="1" width="70%">

<th colspan="2"> Apply for a Job</th>

<tr>
<td><div class="labl">Job: </div></td>
<td>
<?php
$con=mysqli_connect("localhost","root","","placementdb");
$qry="select JobID, JobDesc from placement_tbl";
$run=mysqli_query($con,$qry);
echo '<select name="jid">';
while ($rows=mysqli_fetch_array($run))
{

echo "<option value=".$rows['JobID'].">".$rows['JobDesc']."</option>";

}
?>

</td>
</tr>
<th colspan="2" style="background-color:#0055CC;" > <input type = "submit" name = "submit"
value="Save Details" style="font-size:16px;font-weight:bold; padding:5px;color: #0055CC; text-shadow:
2px 2px 4px orange;" > </th>
</table>

</form>
</body>
</html>
check.php
<form method="get">
<?php
$conn = mysqli_connect("localhost", "root", "","placementDB");

$sql = "SELECT password from users where username='".$_POST["uname"]."'";


$un=$_POST["uname"];

$retval = mysqli_query( $conn, $sql );

while($row = mysqli_fetch_array($retval, MYSQLI_ASSOC))


{
if ($row['password']==$_POST["pwd"])
{
echo "login successful<br> ";
session_start();
$_SESSION['username']=$un;
if ($_POST['usertype']=="S")
header('refresh:0;url=http://localhost:8088/placement/studash.php?uname='.
$un);
else
header('refresh:0;url=http://localhost:8088/placement/admdash.php?uname='.
$un);
}
else
{
echo "<script>alert('username or password incorrect');</script>";
if ($_POST['usertype']=="S")
header('refresh:0;url=http://localhost:8088/placement/stulogin.php');
else
header('refresh:0;url=http://localhost:8088/placement/adminlogin.php');
}
}

mysqli_close($conn);
?>
</form>
checkers.php

<table border="1" width="100%">


<tr>
<th>Job Name</th>
<th>Company Name</th>
<th> Date of Interview</th>
<th>Result</th>
</tr>
<?php
$con=mysqli_connect("localhost","root","","placementdb");

session_start();
$un=$_SESSION['username'];

$qry="select j.JobDesc , j.CompanyName,Qualified, j.InterviewDate from JobApply_tbl s, Placement_tbl j


where s.JobID=j.JobID and s.StuID='$un'";
//echo $qry;
$i=1;
$recset=mysqli_query($con,$qry);
while ($row=mysqli_fetch_array($recset))
{
if ($i%2==0)
{
echo "<tr bgcolor='#B7F7F2'><td>";
}
else
{
echo "<tr bgcolor='#6BF5F1'><td>";
}
$i++;
echo $row["JobDesc"];
echo "</td>";
echo "<td>";
echo $row["CompanyName"];
echo "</td>";
echo "<td>";
echo $row["InterviewDate"];
echo "</td>";
echo "<td>";
if ($row["Qualified"]==1)
echo 'Selected';
else
echo 'Not Selected';
echo "</td></tr>";
}

?>
</table>
chngpwd.php
<html>
<body>
<form method = "post" action="savepwd.php">
<table align="center" border="1" width="70%">

<th colspan="2"> Change Password</th>

<tr>
<td><div class="labl">Old Password: </div></td>
<td><input type="password" name="oldpwd" ></td>
</tr>
<tr>
<td><div class="labl">New Password: </div></td>
<td><input type="password" name="newpwd" ></td>
</tr>
<tr>
<td><div class="labl">Confirm New Password: </div></td>
<td><input type="password" name="cnewpwd" ></td>
</tr>

<th colspan="2" style="background-color:#0055CC;" > <input type = "submit" name = "submit"


value="Save Details" style="font-size:16px;font-weight:bold; padding:5px;color: #0055CC; text-shadow:
2px 2px 4px orange;" > </th>
</table>

</form>
</body>
</html>
CreateJob.php
<html>
<body>
<form method = "post" action ="savedata.php">
<table align="center" border="1" width="70%">

<th colspan="2"> Add a New Job for Placement </th>


<tr>
<td><div class="labl">Job ID: </div></td>
<td><input type="string" name="JobID"></td>
</tr>
<tr>
<td><div class="labl">Job Description: </div></td>
<td><input type="string" name="JobDesc"></td>
</tr>
<tr>
<td><div class="labl">Company Name: </div></td>
<td><input type="string" name="Company" style="width:400px;height:50px"></td>
</tr>
<tr>
<td><div class="labl">Post Date: </div></td>
<td><input type="date" name="PostDate" value=<?php echo date('d-m-y');?>> </td>
</tr>
<tr>
<td><div class="labl">Interview Date: </div></td>
<td><input type="date" name="Interdate"> </td>
</tr>
<tr>
<td><div class="labl">Job Expiry Date: </div></td>
<td><input type="date" name="expDate" value=<?php echo date('d-m-y');?>> </td>
</tr>
<tr>
<td><div class="labl">Stream: </div></td>
<td> <select name="strm">
<option value="Comp Science">Computer Science</option>
<option value="Science">Science</option>
<option value="Commerce">Commerce</option>
<option value="Business Administration">Business Administration</option>
<option value="Arts">Arts</option>
</select>
</td></tr>
<tr>
<td><div class="labl">Qualification: </div></td>
<td><select name="Qual">
<option value="Graduation">Graduation</option>
<option value="Masters">Master</option>
<option value="Post Graduate Diploma">Post Graduate Diploma</option>
<option value="Certificate">Certificate</option>
<option value="PhD">PhD</option>
<option value="MPhil">MPhil</option>
</select>
</td></tr>
<tr>
<td><div class="labl">Other Requirements: </div></td>
<td><input type="string" name="oreq" > </td>
</tr>
<tr>
<td><div class="labl">Salary Package: </div></td>
<td><input type="string" name="salPack" width="300px"></td>
</tr>
<tr>
<td><div class="labl">Location: </div></td>
<td><input type="string" name="Loc" > </td>
</tr>

<th colspan="2" style="background-color:#0055CC;" > <input type = "submit" name = "submit"


value="Save Job" style="font-size:16px;font-weight:bold; padding:5px;color: #0055CC; text-shadow: 2px
2px 4px orange;" > </th>
</table>

</form>
</body>
</html>
dispStuList.php
<html>
<body>
<form method = "post" action ="savedata.php">
<table align="center" border="1" width="70%">

<th colspan="2"> Add a New Job for Placement </th>


<tr>
<td><div class="labl">Job ID: </div></td>
<td><input type="string" name="JobID"></td>
</tr>
<tr>
<td><div class="labl">Job Description: </div></td>
<td><input type="string" name="JobDesc"></td>
</tr>
<tr>
<td><div class="labl">Company Name: </div></td>
<td><input type="string" name="Company" style="width:400px;height:50px"></td>
</tr>
<tr>
<td><div class="labl">Post Date: </div></td>
<td><input type="date" name="PostDate" value=<?php echo date('d-m-y');?>> </td>
</tr>
<tr>
<td><div class="labl">Interview Date: </div></td>
<td><input type="date" name="Interdate"> </td>
</tr>
<tr>
<td><div class="labl">Job Expiry Date: </div></td>
<td><input type="date" name="expDate" value=<?php echo date('d-m-y');?>> </td>
</tr>
<tr>
<td><div class="labl">Stream: </div></td>
<td> <select name="strm">
<option value="Comp Science">Computer Science</option>
<option value="Science">Science</option>
<option value="Commerce">Commerce</option>
<option value="Business Administration">Business Administration</option>
<option value="Arts">Arts</option>
</select>
</td></tr>
<tr>
<td><div class="labl">Qualification: </div></td>
<td><select name="Qual">
<option value="Graduation">Graduation</option>
<option value="Masters">Master</option>
<option value="Post Graduate Diploma">Post Graduate Diploma</option>
<option value="Certificate">Certificate</option>
<option value="PhD">PhD</option>
<option value="MPhil">MPhil</option>
</select>
</td></tr>
<tr>
<td><div class="labl">Other Requirements: </div></td>
<td><input type="string" name="oreq" > </td>
</tr>
<tr>
<td><div class="labl">Salary Package: </div></td>
<td><input type="string" name="salPack" width="300px"></td>
</tr>
<tr>
<td><div class="labl">Location: </div></td>
<td><input type="string" name="Loc" > </td>
</tr>

<th colspan="2" style="background-color:#0055CC;" > <input type = "submit" name = "submit"


value="Save Job" style="font-size:16px;font-weight:bold; padding:5px;color: #0055CC; text-shadow: 2px
2px 4px orange;" > </th>
</table>

</form>
</body>
</html>
logout.php
<?php
session_start();
session_destroy();
//echo "<script>alert('Logout successful');</script>";
header('refresh:0;url=http://localhost:8088/placement/main.php');
?>
NewUser.php
<html>
<body>
<form method = "post" action="saveuser.php">
<table align="center" border="1" width="70%">

<th colspan="2"> Add a New User</th>

<tr>
<td><div class="labl">User Name: </div></td>
<td><input type="string" name="username" ></td>
</tr>
<tr>
<td><div class="labl">Password: </div></td>
<td><input type="password" name="password" ></td>
</tr>
<tr>
<td><div class="labl">User Type: </div></td>
<td><input type="radio" name="userType" value="admin"> Admin<input type="radio"
name="userType" value="student">Student

</td>
</tr>

<th colspan="2" style="background-color:#0055CC;" > <input type = "submit" name = "submit"


value="Save Details" style="font-size:16px;font-weight:bold; padding:5px;color: #0055CC; text-shadow:
2px 2px 4px orange;" > </th>
</table>

</form>
</body>
</html>
saveAppJob.php
<?php
$con=mysqli_connect("localhost","root","","placementdb");
session_start();
$sid=$_SESSION['username'];
$jid=$_POST['jid'];
$qry="insert into jobapply_tbl (StuID, JobID) values ('$sid',$jid)";

if (mysqli_query($con,$qry)==true)
{

echo "<script>alert('Data saved');</script>";


header('refresh:0;url=http://localhost:8088/placement/studash.php');
}
else
{

echo "<script>alert('could not save data');</script>";


header('refresh:0;url=http://localhost:8088/placement/studash.php');
}

?>
savedata.php
<?php
if(isset($_POST['submit']))
{

$con=mysqli_connect("localhost","root","","placementdb");

if ( !empty($_POST["JobDesc"]) and !empty($_POST["Company"]) and !empty($_POST["PostDate"])


and !empty( $_POST["Interdate"]) and !empty($_POST["strm"]) and !empty($_POST["Qual"])
and !empty($_POST["oreq"])
and !empty($_POST["salPack"]) and !empty($_POST["Loc"]) )
{
session_start();
$un=$_SESSION['username'];
$jd=$_POST["JobDesc"];
$cmp=$_POST["Company"];
$pd=$_POST["PostDate"];
$idt=$_POST["Interdate"];
$exdt=$_POST["expDate"];
$strm=$_POST["strm"];
$Qual=$_POST["Qual"];
$oreq=$_POST["oreq"];
$SalPack=$_POST["salPack"];
$Loc=$_POST["Loc"];

$qry="select max(JobID) as maxid from placement_tbl";

$run=mysqli_query($con,$qry);
while ($rows=mysqli_fetch_array($run))
{
$jid=$rows[0];
}

$qry="insert into placement_tbl values


($jid+1,'$jd','$cmp','$pd','$idt','$exdt','$strm','$Qual','$oreq','$SalPack','$Loc')";

if (mysqli_query($con,$qry)==true)
{
//echo $qry;
echo "<script>alert('Data saved');</script>";
header('refresh:0;url=http://localhost:8088/placement/admdash.php?
uname='.$un);
}
else
{
//echo $qry;
echo "<script>alert('could not save data');</script>";
header('refresh:0;url=http://localhost:8088/placement/admdash.php?uname='.
$un);
}
}
else
{
echo "<script>alert('fields cannot be left empty');</script>";
header('refresh:0;url=http://localhost:8088/placement/admdash.php?uname='.$un);
}
}
?>
savepwd.php
<?php
$con=mysqli_connect("localhost","root","","placementdb");
session_start();
$sid=$_SESSION['username'];
$opwd=$_POST['oldpwd'];
$npwd=$_POST['newpwd'];
$cnpwd=$_POST['cnewpwd'];
if ($npwd!=$cnpwd)
{
echo "<script>alert('password do not match');</script>";
header('refresh:0;url=http://localhost:8088/placement/studash.php?uname='.$sid);
}
else
{
$qry="update users set password='$npwd' where username='$sid'" ;

if (mysqli_query($con,$qry)==true)
{

echo "<script>alert('password updated');</script>";


header('refresh:0;url=http://localhost:8088/placement/studash.php?uname='.$sid);
}
else
{
echo $qry;
echo "<script>alert('could not update password');</script>";
header('refresh:0;url=http://localhost:8088/placement/studash.php?uname='.$sid);
}
}

?>
saveresult.php
<?php
if(isset($_POST['submit']))
{

$con=mysqli_connect("localhost","root","","placementdb");

session_start();
$un=$_SESSION['username'];
$jid=$_POST["jobid"];
$res=$_POST["result"];

foreach ($res as $r )
{
$qry="update jobapply_tbl set qualified=1 where JobID='$jid' and StuID='$r'";
$a=mysqli_query($con,$qry);
}

if ($a==true)
{
//echo $qry;
echo "<script>alert('Data saved');</script>";
header('refresh:0;url=http://localhost:8088/placement/admdash.php?
uname='.$un);
}
else
{
//echo $qry;
echo "<script>alert('could not save data');</script>";
header('refresh:0;url=http://localhost:8088/placement/admdash.php?uname='.
$un);
}
}

?>
saveStu.php
<?php
if(isset($_POST['submit']))
{

$con=mysqli_connect("localhost","root","","placementdb");

if (!empty( $_POST["rollno"]) and !empty($_POST["stuname"]))


{
$rno=(integer)$_POST["rollno"];
$snam=$_POST["stuname"];
$fnam=$_POST["fname"];
$dob=$_POST["dob"];
$ph=$_POST["contno"];
$email=$_POST["email"];
$strm=$_POST["strm"];
$cors=$_POST["course"];
$scor=(float)$_POST["score"];
$areaInt=$_POST["AreaInt"];
session_start();
$un=$_SESSION['username'];

$qry="insert into stureg_tbl values ('$un',$rno,'$snam','$fnam','$dob','$ph','$email','$strm','$cors',


$scor,'$areaInt')";

if (mysqli_query($con,$qry)==true)
{

echo "<script>alert('Data saved');</script>";


header('refresh:0;url=http://localhost:8088/placement/studash.php?uname='.$un);
}
else
{

echo "<script>alert('could not save data');</script>";


header('refresh:0;url=http://localhost:8088/placement/studash.php?uname='.
$un);
}
}
else
{
echo "<script>alert('fields cannot be left empty');</script>";
header('refresh:0;url=http://localhost:8088/placement/studash.php?uname='.
$un);
}
}
?>
saveuser.php
<?php
$con=mysqli_connect("localhost","root","","placementdb");
session_start();
$un=$_POST['username'];
$pwd=$_POST['password'];
$utype=$_POST['userType'];

$qry="Insert into users (username,password,usertype) values ('$un','$pwd','$utype')" ;

if (mysqli_query($con,$qry)==true)
{

echo "<script>alert('New User Created');</script>";


header('refresh:0;url=http://localhost:8088/placement/admdash.php');
}
else
{
echo "<script>alert('could not update password');</script>";
header('refresh:0;url=http://localhost:8088/placement/admdash.php');
}

?>
showdata.php
<form method = "post" action ="saveresult.php" >
<table border="1">
<tr>
<th>User name</th>
<th>Student ID</th>
<th>student Name</th>
<th>Result</th>
</tr>
<?php
$con=mysqli_connect("localhost","root","","placementdb");
if(isset($_POST['submit']))
{
$jid=$_POST['jid'];

$qry="select s.userName, s.StuID,StuName from stureg_tbl s, jobapply_tbl j where s.userName=j.StuID


and j.JobID='$jid'";
//echo $qry;
$i=1;
$recset=mysqli_query($con,$qry);
while ($row=mysqli_fetch_array($recset))
{
if ($i%2==0)
{
echo "<tr bgcolor='#ffccff'><td>";
}
else
{
echo "<tr bgcolor='#ff99ff'><td>";
}
$i++;
echo $row["userName"];
echo "</td>";
echo "<td>";
echo $row["StuID"];
echo "</td>";
echo "<td>";
echo $row["StuName"];
echo "</td>";
echo "<td>";
$key=$row["userName"];
echo '<input type="checkbox" name="result[]" value="'.$key.'"';
echo "</td></tr>";
}
}
echo '<input type="hidden" name="jobid" value="'.$jid.'">';
?>
<th colspan="4" style="background-color:#0055CC;" > <input type = "submit" name = "submit"
value="Save result" style="font-size:16px;font-weight:bold; padding:5px;color: #0055CC; text-shadow:
2px 2px 4px orange;" > </th>
</table>
</form>
studash.php
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){

$("#stuDetails").click(function(){
$("#contents").load("stuDetails.php");
});

$("#ApplyJob").click(function(){
$("#contents").load("applyjob.php");
});
$("#CheckRes").click(function(){
$("#contents").load("checkres.php");
});

$("#ChangePwd").click(function(){
$("#contents").load("chngpwd.php");
});
});
</script>
</head>
<body>
<link href="style.css" rel="stylesheet" type="text/css">
<div class="container">
<div class="top-menu">
College Placement System
</div>
<div class="login-menu">
<?php
session_start();
$un=$_SESSION["username"];
echo '<a href="logout.php">'.$un.'&nbspLogout</a>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp';
?>

</div>
<div class="clearfix">
<div class="left-menu">
<div class="listItem"><a id="stuDetails" href="#">Enter Your Details</a></div>
<div class="listItem"><a id="ApplyJob" href="#">Apply for a Job</a></div>
<div class="listItem"><a id="CheckRes" href="#">Check Interview Result</a></div>
<div class="listItem"><a id="ChangePwd" href="#">Change password</a></div>
</div>

<div class="dataform" ">


<div class="form-data" id="contents" style=" box-shadow: 10px 10px lightgrey;">

</div>
</div>
</div>
</div>

</body>
</html>
studetails.php
<html>
<body>
<form method = "post" action="saveStu.php">
<table align="center" border="1" width="70%">

<th colspan="2"> Add Your Details </th>


<tr>
<td><div class="labl">StudentID/Roll No: </div></td>
<td><input type="string" name="rollno"></td>
</tr>
<tr>
<td><div class="labl">Name: </div></td>
<td><input type="string" name="stuname"></td>
</tr>
<tr>
<td><div class="labl">Father's Name: </div></td>
<td><input type="string" name="fname" ></td>
</tr>
<tr>
<td><div class="labl">Date of Birth: </div></td>
<td><input type="date" name="dob" value=<?php echo date('Y-m-d H:i:s');?></td>
</tr>
<tr>
<td><div class="labl">Contact Number: </div></td>
<td><input type="string" name="contno" ></td>
</tr>
<tr>
<td><div class="labl">Email ID: </div></td>
<td><input type="string" name="email" ></td>
</tr>
<tr>
<td><div class="labl">Stream: </div></td>
<td> <select name="strm">
<option value="Comp Science">Computer Science</option>
<option value="Science">Science</option>
<option value="Commerce">Commerce</option>
<option value="Business Administration">Business Administration</option>
<option value="Arts">Arts</option>
</select>
</td></tr>
<tr>
<td><div class="labl">Course: </div></td>
<td><select name="course">
<option value="BCA">BCA</option>
<option value="B.Sc.">B.Sc.</option>
<option value="PGDCA">PGDCA</option>
<option value="PGDMC">PGDMC</option>
<option value="BBA">BBA</option>
<option value="BCOM">BCOM</option>
<option value="BA">BA</option>
<option value="MCOM">MCOM</option>
<option value="M.Sc.">M.Sc.</option>
</select>
</td></tr>

<td><div class="labl">last Score in %age: </div></td>


<td><input type="float" name="score"> </td>
</tr>
<tr>
<td><div class="labl">Area of Interest: </div></td>
<td><input type="string" name="AreaInt" > </td>
</tr>

<th colspan="2" style="background-color:#0055CC;" > <input type = "submit" name = "submit"


value="Save Details" style="font-size:16px;font-weight:bold; padding:5px;color: #0055CC; text-shadow:
2px 2px 4px orange;" > </th>
</table>

</form>
</body>
</html>
stulogin.php
<html>
<link href="style.css" rel="stylesheet" type="text/css">
<body>
<form method="post" action="check.php">
<div class="container">
<div class="top-menu">
College Placement System
</div>
<div class="loginblock"><center>
<font style="font-size:20px; font-weight:bold;"> Student Login</font><br><br><br><br>
User Name:<input type="string" name="uname"><br><br>
Password:<input type="password" name="pwd"><br><br>
<input type="hidden" name="usertype" value="S">
<input type="submit" name="submit" name="submit"><br><br><br></center>
</div>
</div>
</form>
</body>
</html>
style.css
.container
{
background-color: #ffffff;
width:100%;
height:100%;
}
.clearfix::after {
content: "";
clear: both;
display: table;
}
.left-menu
{
width:15%;
height:90%;
background-color: #99BBBB;
padding-top:10px;
padding-left:10px;
padding-right:0px;
float: left;
border: 2px solid #005544;
}
.top-menu
{
width:100%;
height:5%;
background-color: #FF6622;
float:top;
text-align:center;
font-family:verdana;
font-size:24;
text-transform:float;
font-weight: bold;
padding-top:10px;
text-shadow: 1px 1px #dddddd;
}
.listItem
{
font-family:verdana;
font-size:14;
text-transform:float;
font-weight: bold;
padding-top:10px;
padding-bottom:10px;
background-color:#99BBCC;
border-bottom: 4px solid #0055CC;
}

.dataform
{
width:80%;
height:90%;
font-family:verdana;
font-size:12;
padding-top:10px;
padding-bottom:10px;
padding-left:5px;
background-color:#ffffff;
border: 2px solid #005544;
float: right;
}
.form-data
{
width:90%;
height:80%;
border: 2px solid #ffffff;
background-color: #99dddd;
padding-top:10px;
padding-bottom:10px;
padding-left:5px;
margin-top: 50px;
margin-bottom: 50px;
margin-right: 50px;
margin-left: 50px;
}

.labl
{
font-family:verdana;
font-size:14;
font-weight: bold;
}
table
{
margin-top: 50px;
border-color:#99aaaa;
border-collapse: collapse;
}
tr{
height: 50px;
}
th
{
text-align:center;
padding: 10px;
background-color:#ddddee;
}
td {
text-align: left;
}
.jobbox
{
width:60%;
height:200px;
border: 2px solid ;
background-color: #ffffff;
padding-top:5px;
padding-bottom:5px;
padding-left:5px;
margin-top: 20px;
margin-bottom: 20px;
border-color:#99aaaa;
border-collapse: collapse;
margin-left: 20%;
border-style: ridge;
border-width: 2px 10px 4px 20px;
}
.login-menu
{
width:100%;
height:2%;
background-color: #1111cc;
float:top;
text-align:right;
font-family:verdana;
font-size:12;
padding-top:10px;
padding-bottom:10px;

color: #FFffff;
}
a:link {
color: white;
}

/* visited link */
a:visited {
color: white;
}

/* mouse over link */


a:hover {
color: yellow;
}

.loginblock
{
width:20%;
height:200px;
border: 2px solid ;
background-color: #ffffff;
padding:30px 30px 30px 30px;
margin-top: 10%;
border-color:#33aaaa;
border-collapse: collapse;
margin-left: 35%;
border-style: ridge;
border-width: 2px 10px 4px 20px;
text-align:center;
font-family:verdana;
font-size:16px;
}
placementdb.sql
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 28, 2019 at 06:35 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `placementdb`
--

-- --------------------------------------------------------

--
-- Table structure for table `jobapply_tbl`
--

CREATE TABLE `jobapply_tbl` (


`StuID` varchar(40) NOT NULL,
`JobID` int(11) NOT NULL,
`Qualified` int(11) NOT NULL,
`Remarks` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------
--
-- Table structure for table `placement_tbl`
--

CREATE TABLE `placement_tbl` (


`JobID` int(11) NOT NULL,
`JobDesc` varchar(300) NOT NULL,
`CompanyName` varchar(300) NOT NULL,
`PostDate` date NOT NULL,
`InterviewDate` date NOT NULL,
`ExpDate` date NOT NULL,
`Stream` varchar(20) NOT NULL,
`Qualification` varchar(25) NOT NULL,
`OtherReq` varchar(300) NOT NULL,
`SalPackage` varchar(20) NOT NULL,
`Location` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `stureg_tbl`
--

CREATE TABLE `stureg_tbl` (


`userName` varchar(40) NOT NULL,
`StuID` int(11) NOT NULL,
`StuName` varchar(50) NOT NULL,
`StuFName` varchar(50) NOT NULL,
`StuDOB` date NOT NULL,
`ContactNo` varchar(15) NOT NULL,
`StuEmail` varchar(50) NOT NULL,
`Stream` varchar(40) NOT NULL,
`Course` varchar(10) NOT NULL,
`LastScore` float NOT NULL,
`AreaOfInterest` varchar(300) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (


`username` varchar(20) NOT NULL,
`password` varchar(20) NOT NULL,
`usertype` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

You might also like