<?php 
session_start();
include 'dbc.php';
$userid=$_SESSION["userid"];
$id=$_POST["id"];
$pname=$_POST["pname"];
$bname=$_POST["bname"];
$phoneno=$_POST["phoneno"];
$cellno=$_POST["cellno"];
$watsappno=$_POST["watsappno"];
$ctype=$_POST["ctype"];

$city=$_POST["city"];
$email=$_POST["email"];
$address=$_POST["address"];
$ntnno=$_POST["ntnno"];
$saletaxno=$_POST["saletaxno"];

$sql = "update vendor set 
pname='$pname', bname='$bname', phoneno='$phoneno', cellno='$cellno', watsappno='$watsappno',ctype='$ctype',city='$city', email='$email', address='$address', ntnno='$ntnno', saletaxno='$saletaxno' where id='$id' and user_id='$userid'";
$conn->query($sql);

//mysql_query($sql) or die("Error : " . mysql_error());



header("location:Edit_Del_Vendor.php");

/*$sql="Select * from agents where userid='$user_id'";
$data=mysql_query($sql) or die ("Error:" . mysql_error());
$userdata=mysql_fetch_array($data);
$email=$userdata["e_mail"];
mail($email . ",info@lalburj.com","Candidate Information","Candidate Data Posted Successfully","Passport No:" . $app_pp_no . " of " . $app_name . "Has been Posted Successfully By:" . $_SESSION["userid"]);*/
?>
