CasperSecurity
<?php
session_start();
include '../../../../web/connection/connection.php';
// vendor variables
$vendor_id = $_REQUEST['vendor_id'];
$organisation_unit_id = $_REQUEST['organisation_unit_id'];
$vendor_type = $_REQUEST['vendor_type'];
$vendor_code = $_REQUEST['vendor_code'];
$vendor_name = $_REQUEST['vendor_name'];
$vendor_logo = $_REQUEST['vendor_logo'];
$vendor_address = $_REQUEST['vendor_address'];
$vendor_tele_phone = $_REQUEST['vendor_tele_phone'];
$vendor_fax = $_REQUEST['vendor_fax'];
$vendor_mail = $_REQUEST['vendor_mail'];
$vendor_contact_person = $_REQUEST['vendor_contact_person'];
$vendor_contact_person_telephone = $_REQUEST['vendor_contact_person_telephone'];
$vendor_contact_person_mobile = $_REQUEST['vendor_contact_person_mobile'];
$vendor_contact_person_mail = $_REQUEST['vendor_contact_person_mail'];
$inter_state = $_REQUEST['inter_state'];
$modified_on = date('Y-m-d');
$modified_by = $_REQUEST['created_by'];
$is_active = $_REQUEST['is_active'];
// vendor type variables
$vendor_type_id = $_REQUEST['vendor_type_id'];
$vendor_type_name = $_REQUEST['vendor_type_name'];
// update data into vendor table
$db_handle = new DBController();
$newUpdate = $db_handle->runMyUpdate("UPDATE vendor SET vendor_id = '$vendor_id',organisation_unit_id ='$organisation_unit_id',vendor_type ='$vendor_type',vendor_code='$vendor_code',
vendor_name='$vendor_name',vendor_logo = '$vendor_logo',vendor_address ='$vendor_address',vendor_tele_phone ='$vendor_tele_phone',vendor_fax='$vendor_fax',
vendor_mail='$vendor_mail',vendor_contact_person = '$vendor_contact_person',vendor_contact_person_telephone ='$vendor_contact_person_telephone',
vendor_contact_person_mobile ='$vendor_contact_person_mobile',vendor_contact_person_mail='$vendor_contact_person_mail',inter_state='$inter_state',modified_on='$modified_on',modified_by='$modified_by',
is_active='$is_active' WHERE vendor_id = '$host'");
if($newUpdate == TRUE){
echo 'Data updated Successfully in table 1';
// update data into vendor type table
$db_handle = new DBController();
$newUpdate = $db_handle->runMyUpdate("UPDATE vendor_type SET vendor_type_id = '$vendor_type_id',vendor_type_name ='$vendor_type_name' WHERE vendor_type_id = '$host'");
if($newUpdate == TRUE){
echo 'Data updated Successfully in table 2';
}else{
echo 'Not updated in 2' ;
}
}else{
echo 'Not updated in 1' ;
}
?>