<?php
include 'dbconnection.php';

$id = $_POST['sno'];

$comment = $_POST['comment'];

// $login_id = $_POST['login_id'];
// $password = $_POST['password'];
// $role = $_POST['role'];
//$sql="UPDATE leads set comments='$comment' WHERE  sno='$sno' ";	

$sql="INSERT INTO lead_comments (sno,id,comment,time) 
VALUES 
('{$sno}','{$id}','{$comment}',NOW())";


if (!mysqli_query($conn,$sql))
  {
  die('Error: ' . mysqli_error());
  }
else {
header("location: ../lead_comments?sno=$id");
}
mysqli_close($conn)
?> 