Edit Action PHP

Pranat
0
Lamp

 <?php


$stid = filter_input(INPUT_POST, 'txtRegNo');

$stname = filter_input(INPUT_POST, 'txtName');

$stemail = filter_input(INPUT_POST, 'txtEmail');

$stcourse = filter_input(INPUT_POST, 'txtCourse');

$stmobile = filter_input(INPUT_POST, 'txtMobile');

$stage = filter_input(INPUT_POST, 'txtAge');

require './db.php';

$sql = "UPDATE tblStudents SET student_name ='$stname', student_email='$stemail',student_course='$stcourse',student_mobile=$stmobile,student_age=$stage WHERE student_id=$stid";

if ($con->query($sql) === TRUE) {

    header("Location:index.php");

} else {

    echo "Error: " . $sql . "<br>" . $con->error;

}


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
Our website uses cookies to enhance your experience. Learn More
Accept !