Location: PHPKode > projects > Simple SMS Site Software > simple-sms-site-software/do_admin_edit.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();

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

$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
$edited_user = $_POST['theUser'];

if ($access == "admin") {
	
	$fullName = $_POST['theName'];

	$add1 = $_POST['address1'];
	$add2 = $_POST['address2'];
	$add3 = $_POST['address3'];
	$postcode = $_POST['postcode'];

	$mobile = $_POST['theMobile'];
	$landline = $_POST['theLandline'];
	
	$email = $_POST['email'];
	
	$creds = $_POST['credits'];
	
	$notes = $_POST['theNotes'];
	
	if ($_POST['theAdmin'] == "1")
		$admin = 'yes';
	else
		$admin = 'no';

	if ($_POST['theGuest'] == "1")
		$guest = 'yes';
	else
		$guest = 'no';

	$query = "UPDATE users SET name='$fullName', details='$notes', add1='$add1', add2='$add2', add3='$add3', postcode='$postcode', email='$email', mobile='$mobile', landline='$landline', pword_lock='$guest', admin='$admin' WHERE username='$edited_user'";
	mysql_query($query);

	?><p align="center"><?echo "User $edited_user has been updated";?></p><?	
	
}
else {
	include("inc/restricted.inc.php");
}
include("inc/footer.inc.php");
?>
Return current item: Simple SMS Site Software