<?php

$org_id = $_GET['org_id'];

$representative  = mysql_escape_string($_POST['representative']);
$company_name  = mysql_escape_string($_POST['company_name']);
$abn = mysql_escape_string($_POST['abn']);
$street = mysql_escape_string($_POST['street']);
$suburb = mysql_escape_string($_POST['suburb']);
$postcode = mysql_escape_string($_POST['postcode']);
$state = mysql_escape_string($_POST['state']);
$phone = mysql_escape_string($_POST['phone']);
$mobile = mysql_escape_string($_POST['mobile']);
$email = mysql_escape_string($_POST['email']); 

$con = mysql_connect('localhost', 'root', 'Boom95z') or die(mysql_error());
mysql_select_db('orion9', $con);

mysql_query("update organisations set representative='" . $representative . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set company_name='" . $company_name . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set abn='" . $abn . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set street='" . $street . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set suburb='" . $suburb . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set postcode='" . $postcode . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set state='" . $state . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set phone='" . $phone . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set mobile='" . $mobile . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set email='" . $email . "' where org_id=" . $org_id, $con);
mysql_query("update organisations set last_self_update = now() where org_id=" . $org_id, $con);

mysql_close($con);
 
header('Location:client-details.php');

?>