Develop Feedback System in PHP with code __ Microproject I Scheme



The feedback system in PHP is a simple mini project to respond to any service or any system performance. The project includes an administrator side and user side. The administrator can view feedback from others and evaluate them. The purpose of giving feedback is to improve the performance of the situation or individual/organization

Feedback-System-in-php

The Student Feedback System is designed and develope using HTML,CSS,PHP and the Backend is developed using MYSql database
+++++++++++++++++++++++++++++ 
Rquirements: XAMPP Apache and MySql server to Run Project 
                       Put image along with .php files 
                       Create database named FF and the table named feedback 
Column names : Username,Email,Address,Branch,suggestions,improvement
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Developer and Desinger : Shivam Hande
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Follow me on Instagram : https://www.instagram.com/shiv.am.h/
Follow me on gitHub : http://github.com/ShivamHande

               https://www.circuitcoder.com/





Source Code:



FF.php

<html> <head> <title></title> </head> <body> <style> input[type=text], select { width: 30%; height: 3%; padding: 12px 20px; margin: 8px 0; border: 2px solid #ccc; border-radius: 1px; box-sizing: border-box; } input[type=submit]:hover { background-color: cornflowerblue; } div{ padding-: 10px; width : 350px; text-align: right; color: white; font-size: 20px; } .label{ padding: 8px; font-family: Arial; } body { background-image: url('feed.png'); } </style> <?php error_reporting(0); $name=$_POST["sname"]; $id=$_POST["eid"]; $Add=$_POST["Add"]; $b=$_POST["branch"]; $s=$_POST["sss"]; $im=$_POST["im"]; if (isset($_POST["Clear"])) { $name=""; $id=""; $Add= $b=""; $s=""; $im=""; } if(isset($_REQUEST['Submit'])) { $servername = "localhost"; $username = "root"; $password = ""; $db="FF"; $conn = new mysqli($servername, $username, $password,$db); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "INSERT INTO feedback (Username,Email,Address,Branch,suggestions,improvement) VALUES ('$name','$id','$Add','$b','$s','$im')"; if ($conn->query($sql) === TRUE) { $s1="Data Saved successfully"; } else { $ss1="not saved"; } $conn->close(); } ?> <form method="Post" action=""> <br> <h1 style="color:white";>Feedback System</h1> <br> <div> <label>Student Name:</label> <input type="text" name="sname" required="" value="<?php echo $name; ?>"></div> <br> <div> Email:<input type="text" name="eid" required="" value="<?php echo $id; ?>"> </div> <br> <div> Address:<input type="text" name="Add" required="" value="<?php echo $Add; ?>"></div> <br> <div> Branch:<input type="text" name="branch" required="" value="<?php echo $b; ?>"></div> <br> <div> Suggestion<input type="text" name="sss" required="" value="<?php echo $s; ?>"></div> <br> <div> Improvement:<input type="text" name="im" required="" value="<?php echo $im; ?>"></div> <br> <div> <input type="submit" name="Submit" value="Submit" style="border-radius: 12px; padding: 10px 16px;"> <input type="submit" name="Clear" value="Clear" style="border-radius: 12px; padding: 10px 16px; "> </div> <div> <label><?php echo $s1 ?></label> <label><?php echo $ss1 ?></label> </div> </form> </form> <form method="Post" action="Admin.php"> <div> <input type="submit" name="Admin" value="Admin" style="border-radius: 12px; padding: 10px 16px; "></div> </form> </body> </html>

Output:


Admin.php

<!DOCTYPE html> <html> <head> <style> body { background-image: url('bg11.jpg'); } table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; } input[type=text], select { width: 50%; height: 3%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 2px solid #ccc; border-radius: 4px; box-sizing: border-box; } input[type=password], select { width: 50%; height: 3%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 2px solid #ccc; border-radius: 4px; box-sizing: border-box; } input[type=submit]:hover { background-color: cornflowerblue; } div{ padding-: 10px; width : 350px; text-align: right; color: white; font-size: 20px; } .label{ padding: 8px; font-family: Arial; } </style> </head> <body> <form action="" method="post"> <div> <label>Username:</label> <input type="text" name="username" value=""> </div><br> <div> <label>Password:</label> <input type="password" name="psw" value=""></div> <br> <div> <input type="submit" name="Login" value="Login"style="border-radius: 12px; padding: 10px 16px; "></div> </form> </body> <?php error_reporting(0); if(isset($_POST['Login'])) { $name=$_POST["username"]; $id=$_POST["psw"]; if ($name=="Rishika" && $id="123") { $servername = "localhost"; $username = "root"; $password = ""; $dbname = "FF"; $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT * FROM feedback"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { $n=$row["Username"]; $i=$row["Email"]; $p=$row["Address"]; $s=$row["Branch"]; $t=$row["suggestions"]; $a=$row["improvement"]; echo "<table>"; echo "<tr>"; echo "<th>Name</th>"; echo "<th>Emai</th>"; echo "<th>Address</th>"; echo "<th>Branch</th>"; echo "<th>Suggestions</th>"; echo "<th>Improvement</th>"; echo "</tr>"; echo "<br>"; echo "<tr>"; echo "<td>",$n,"</td>"; echo "<td>",$i,"</td>"; echo "<td>",$p,"</td>"; echo "<td>",$s,"</td>"; echo "<td>",$t,"</td>"; echo "<td>",$a,"</td>"; echo "<td>",$tt,"</td>"; echo "<td>",$g,"</td>"; echo "</tr>"; echo "</table>"; } } else { echo "0 results"; } } } else if(isset($_POST['Login'])) { header('Location: Admin1.php'); } ?> </html>


Output:


Comments