Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname="lamp";
- $conn = new mysqli($servername,$username,$password,$dbname);
- if ($conn->connect_error)
- {
- die("Connection failed: " . $conn->connect_error);
- }
- $contactno=mysqli_real_escape_string($conn,$_POST['contactno']);
- $description=mysqli_real_escape_string($conn,$_POST['description']);
- $email=mysqli_real_escape_string($conn,$_POST['contactemail']);
- $subject=mysqli_real_escape_string($conn,$_POST['subject']);
- $creationdate=mysqli_real_escape_string($conn,$_POST['creationdate']);
- if(isset($_POST['status1']))
- {
- $status =$_POST['status1'];
- }
- if(isset($_POST['noteid']))
- {
- $id = mysqli_real_escape_string($conn,$_POST['noteid']);
- }
- $stmt=$conn->prepare("update notifications set subject=?,description=?
- ,status=?, creationdate=?,contactno=?,contactemail=? where id=? ");
- $stmt->bind_param("ssisisi",$subject,$description,$status,$creationdate,$contactno,$email,$id);
- $stmt->execute();
- $stmt->store_result();
- if($stmt->num_rows >0)
- {
- echo "sucess";
- header("Location: updategovermentnotification.php");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement