Location: PHPKode > projects > Simple SMS Site Software > simple-sms-site-software/do_change_details.php
<?php
/******************************************************************************
************** Simple SMS Site Software *********************************
************** SSSSv1.0*****************************************************
************** by (aq) limited http://aql.com *******************************
************** All Rights Reserved ******************************************
************** Please read COPYRIGHT file prior to modification********
********************************************************************************/
	
session_start();

$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
$add1 = $_POST['add1'];
$add2 = $_POST['add2'];
$add3 = $_POST['add3'];
$postcode = $_POST['postcode'];
$email = $_POST['email'];
$mobile = $_POST['mobile'];
$landline = $_POST['landline'];
$notes = $_POST['theNotes'];

include("inc/header.inc.php");

if ($access == "forbidden") {
	include("inc/restricted.inc.php");
}
elseif ($access == "guest") {
	include("inc/restricted.inc.php");
}
else {

	$query = "UPDATE `users` SET `add1` = '$add1', `add2` = '$add2', `add3` = '$add3', 
		`postcode` = '$postcode', `email` = '$email', `mobile` = '$mobile', `landline` = '$landline', `details` = '$notes' WHERE `username` = '$user' LIMIT 1";
	$result = mysql_query($query);
	if (!$result) {
	   	echo 'Could not run query: ' . mysql_error();
		exit;
	}
	else {
		?>
		<p align="center">Details updated</p>
		<?
	}
}
include("inc/footer.inc.php");
?>
Return current item: Simple SMS Site Software