PHP 2
PHP 2
data and display the mark list of a student by accepting the register no of the student.
Insert.php
<?php
// Database connection
$servername = "localhost";
$dbname = "nithin";
// Create connection
// Check connection
if ($conn->connect_error)
$roll_no = $_POST['roll_no'];
$name = $_POST['name'];
$mark = $_POST['mark'];
$grade = $_POST['grade'];
$sql = "INSERT INTO student (roll_no, name, mark, grade) VALUES ('$roll_no', '$name', '$mark',
'$grade')";
if ($conn->query($sql) === TRUE) {
} else {
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</form>
</body>
</html>
Delete.php
<?php
// Database connection
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "nithin";
// Create connection
// Check connection
if ($conn->connect_error) {
$roll_no = $_POST['roll_no'];
$result = $conn->query($sql);
if ($result->num_rows > 0) {
} else {
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Search Student</title>
</head>
<body>
</form>
</body>
</html>