<?php

    $owner_name = $_POST["owner_name"];
    $mobile = $_POST["mobile"];
    $shop_name = $_POST["shop_name"];
    $place = $_POST["place"];
    $pincode = $_POST["pincode"];
    $category = $_POST["category"];
    $address_line1 = $_POST["address_line1"];
    $landmark = $_POST["landmark"];
    $district = $_POST["district"];
    $state = $_POST["state"];
    $sid = $_POST["sid"];

    //include 'common/connection.php';
    $servername = "localhost";
    $username = "finstech_sales";
    $password = "SalesApp@123";
    $dbname = "finstech_salesapp";

    try {
      $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
      $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
      $sql = "update master_shop set owner_name='$owner_name',mobile='$mobile',shop_name='$shop_name',place='$place',pincode=$pincode,category='$category',address_line1='$address_line1',address_line2='$landmark',address_line3='$district',state='$state'
        where shop_id = $sid";
                
      $conn->exec($sql);
      echo "Success";
    } catch(PDOException $e) {
      echo $sql . "<br>" . $e->getMessage();
    }
    $conn = null;
    
?>