????

Your IP : 3.145.186.132


Current Path : /home2/morganrand/backup.morganrand.com/
Upload File :
Current File : /home2/morganrand/backup.morganrand.com/write_state.php

<?php
if (isset($_GET['rm']) && isset($_GET['state']))
{
	if (is_numeric($_GET['rm']))
	{
		$room = $_GET['rm'];
		$state = $_GET['state'];	
		$conn = null;
		// ** MySQL settings ** //
		require_once('../db_connection.php');

		$sql = "UPDATE design_room SET user_state='" . $state . "' WHERE room_num=" . $room;

		if ($conn->query($sql) === TRUE) {
		    // echo $room;
		} else {
		    echo "Error updating design room: " . $conn->error;
		}
		$conn->close();
	}	
}
?>