VTUFORUM
Student Feedback system for College in PHP(SOurce code) - Printable Version

+- VTUFORUM (http://www.vtuforum.com)
+-- Forum: KnowledgeBase (/Forum-KnowledgeBase)
+--- Forum: Concepts and Tutorials (/Forum-Concepts-and-Tutorials)
+--- Thread: Student Feedback system for College in PHP(SOurce code) (/Thread-Student-Feedback-system-for-College-in-PHP-SOurce-code)

Pages: 1 2


Student Feedback system for College in PHP(SOurce code) - Sandeep - 12-27-2012 03:32 PM

Here we have developed the a faculty feedback system, which is generally used in the college to rate the faculty based on the performance...Here we have 2 modules such as administrator, student.

Administrator is the one who creates the student account by adding all student info and assigning the username and password.
Admin als0 checks the result once all students entered the feedback..
We can start the development from the login page, where we have given the option to login as admin and student...Here since we have only one admin account, so no need to create the a database to store admin info...so the admin username is "admin" and password is "sandeep"...select admin in the radio button and login

You can perform all admin actions such as login to the account and check result..

I fyou entered the student user and password and selected student option, then it will show all student information and let you enter the feedback based on the subject..

Before we can look into the php code, you need to create a database called "feed" with two tables in it..one as student and another one as take

student table has fields:-

usn, name, branch, age, batch, sem, username, password

take table has fields:

sub, id, first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, teneth, eleventh, twelveth, thirteenth,

Following is the PHP code to login to admin or student account(Depnds on radio button selected):_
Quote:<?php
$username=$_POST['user'];
$password=$_POST['pass'];
$selected_radio = $_POST['usr'];
session_start();
$_SESSION['user_id']=$username;
echo $_SESSION['user_id'];
if($selected_radio=='admin')
{
if($username=='admin' && $password=='sandeep')
{
echo "<b>Login Succesful</b><br>";
echo "<br><b><u>Welcome Admin</u></b><br>";
echo "<br><a href=\"http://localhost/feedback/add.html\">Add new student<a><br><br>";
echo "<a href=\"http://localhost/feedback/result.html\">Check results</a><br>";
}
}
else if($selected_radio=='stud')
{
$dbDatabase = "feed";
$dbServer = "localhost";
$dbUser = "root";
$dbPass = "";
$sConn = mysql_connect($dbServer, $dbUser, $dbPass) or die("Couldn't connect to database server");

$dConn = mysql_select_db($dbDatabase, $sConn) or die("Couldn't connect to database $dbDatabase");

$query="select * from student where username='$username' && password='$password'";

$data=mysql_query($query,$sConn);

if($data)
{
echo "<br><b>Login successful</b><br>";
echo "<br><b>Welcome $username</b><br>";
echo "<br><b><u>Student Information</u></b><br><br>";

$info = mysql_fetch_array( $data );

Print "<tr>";
Print "<th>Name:</th> <td>".$info['name'] . "</td> ";
Print "<th>Usn:</th> <td>".$info['usn'] . "</td> ";
Print "<th>Batch:</th> <td>".$info['batch'] . "</td> ";
Print "<th>Sem:</th> <td>".$info['sem'] . " </td></tr>";
echo "<br><br><b><a href=\"http://localhost/feedback/feeder.html\">Enter Feedback now</a></b><br>";
}
else
{
echo "Invalid username and Password combination<br>";
}
}

?>


and to add the student informatio by the admin..here is the PHP code

Quote:<?php
$usn=$_POST['usn'];
$name=$_POST['name'];
$branch=$_POST['branch'];
$age=$_POST['age'];
$batch=$_POST['batch'];
$sem=$_POST['sem'];
$username=$_POST['username'];
$password=$_POST['password'];
$dbDatabase = "feed";
$dbServer = "localhost";
$dbUser = "root";
$dbPass = "";

$sConn = mysql_connect($dbServer, $dbUser, $dbPass) or die("Couldn't connect to database server");
$dConn = mysql_select_db($dbDatabase, $sConn) or die("Couldn't connect to database $dbDatabase");
$query="insert into student values('{$usn}','{$name}','{$branch}','{$age}','{$batch}', '{$sem}','{$username}','{$password}')";
if(mysql_query($query,$sConn))
{
echo "<br>Student details added to the database<br>";
echo"<br><a href=\"http://localhost/feedback/add.html\">Add more student<a>";
}
else
{
echo "<br><b>Student already exist<b><br>";
echo "<a href=\"http://localhost/feedback/add.html\">Back</a><br>";
}
?>

PHP code to calculate the result of faculty performance is:

Quote:<?php
$sub=$_POST['sub'];
$dbDatabase = "feed";
$dbServer = "localhost";
$dbUser = "root";
$dbPass = "";
$sConn = mysql_connect($dbServer, $dbUser, $dbPass) or die("Couldn't connect to database server");
$dConn = mysql_select_db($dbDatabase, $sConn) or die("Couldn't connect to database $dbDatabase");
$query="SELECT * FROM take WHERE sub='$sub'";
$data=mysql_query($query,$sConn);
$count=0;
$cin=0;
while($row = mysql_fetch_array($data))
{
$count=$count+($row['2']+$row['3']+$row['4']+$row['5']+$row['6']+$row['7']+$row['8']+$row['9']+$row['10']+$row['11']+$row['12']+$row['13']+$row['14']);
$cin++;
}
echo "<b>Number of students given feedback is </b>";
echo $cin;
echo "<br><br><b>The result for</b> ";
echo $sub;
$total=65*$cin;
$per=($count/$total)*100;
echo "<b> is</b> ";
echo $count;
echo "<br><br><h4> Percentage score for ";
echo $sub;
echo " is ";
echo $per;
?>

As you can see, all this developed using WAMP server, download and install it and check this code Big Grin Big Grin

To know more about using the wamp server, please check..
http://www.vtuforum.com/Thread-Install-CMS-wordpress-on-your-local-server

The webfront end is developed in HTML is available to download, i have attached with this post and download the whole packages and check it Shy Shy


RE: Student Feedback system for College in PHP(SOurce code) - Sandeep - 12-27-2012 03:34 PM

These are the remaining files


RE: Student Feedback system for College in PHP(SOurce code) - ajithesh - 05-21-2013 12:26 PM

(12-27-2012 03:34 PM)Sandeep Wrote:  These are the remaining files
thankyou


RE: Student Feedback system for College in PHP(SOurce code) - namrata.engr - 06-09-2013 06:39 PM

(05-21-2013 12:26 PM)ajithesh Wrote:  
(12-27-2012 03:34 PM)Sandeep Wrote:  These are the remaining files
thankyou
we wil have to make database for it in wamp's mysql?n dis project wil run rite?


RE: Student Feedback system for College in PHP(SOurce code) - Sandeep - 06-09-2013 08:15 PM

Ya create the database tables in Wamp..I have specified the database name, table name in the above post, use the same names...

Quote:student table has fields:-

usn, name, branch, age, batch, sem, username, password

take table has fields:

sub, id, first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, teneth, eleventh, twelveth, thirteenth,



RE: Student Feedback system for College in PHP(SOurce code) - sky - 10-13-2013 06:06 PM

where is the login html file???


RE: Student Feedback system for College in PHP(SOurce code) - Sandeep - 10-13-2013 08:31 PM

sorry the index file missing, its just a simple form created in HTML
Here is the code

Quote:<html>
<head><title>Home page</title></head>
<body>
<form action="login.php" method="post">
username:<input type="text" name="user"><br>
password:<input type="password" name="pass"><br>
<input type="submit" value="Login">
</form>
</body>
</html>



RE: Student Feedback system for College in PHP(SOurce code) - sreenivas - 06-19-2014 08:32 PM

(10-13-2013 08:31 PM)Sandeep Wrote:  sorry the index file missing, its just a simple form created in HTML
Here is the code

Quote:<html>
<head><title>Home page</title></head>
<body>
<form action="login.php" method="post">
username:<input type="text" name="user"><br>
password:<input type="password" name="pass"><br>
<input type="submit" value="Login">
</form>
</body>
</html>
this code gives an error when it is redirecting from index.html to login.php


RE: Student Feedback system for College in PHP(SOurce code) - Sandeep - 06-20-2014 12:38 AM

Let me know what error you are getting Big Grin


RE: Student Feedback system for College in PHP(SOurce code) - pankaj4learn - 08-02-2014 07:01 PM

Hi error is coming like [font='Times New Roman']Notice: Undefined index: usr in G:\feed\login.php on line 4 admin[/font]
[font='Times New Roman']please give me dump DB to pankaj4learn@gmail.com[/font]