<?php
session_start();
?>
<?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
mysqli_select_db($conn,'empdb');
if(isset($_POST['submit_btn1']))
{
$name=$_POST['name'];
$mobile=$_POST['mobile'];
$gender=$_POST['gender'];
$address=$_POST['address'];
$city=$_POST['city'];
$expireance=$_POST['EXPERIANCED'];
$subscribtion=$_POST['subcribed'];
$empcode=$_SESSION['edit'];
$query=conn->prepare("UPDATE employee SET name=?, gender=?,mobile=?,address=?,city=?,expireance=?,subscribtion=? WHERE emp_code=?;");
$query->blind_param('ssssssss',$name,$gender,$mobile,$address,$city,$expireance,$subscribtion,$empcode);
$query->execute();
if ($conn->query($query ) ===TRUE) {
header("location: employee_edit.php");
} else {
echo "Error: " . $query . "<br>" . $conn->error;
}
$conn->close();
}
?>
hey guys i am new to php and i need help at line no 35 please help me out