<?php
include("sessionLogin.php");
include("connect.php");
$user=$_SESSION['client'];

$query=mysql_query("select * from customer where userID='$user'");
$display=mysql_fetch_array($query);
$no = $display['no'];

$fname = $_POST["fname"];
$lname = $_POST["lname"];
$street = $_POST["street"];
$postcode = $_POST["postcode"];
$state = $_POST["state"];
$country = $_POST["country"];

mysql_query("UPDATE shipping SET fname='$fname', lname='$lname', street='$street', postcode='$postcode', state='$state', country='$country' WHERE user='$no'");

echo"<script language=javascript>alert('Update shipping address successful!!');window.location='accountAddress.php'</script>";

?>