Example #1
0
  },
  "responseDetails" : null,
  "responseStatus" : 200
}
<?php 
            } else {
                if (isset($_GET['u'])) {
                    $id = $_GET['u'];
                    if (!is_numeric($id)) {
                        die("wrong format - id has to be numeric");
                    }
                    $newstate = $_GET['state'];
                    if (!is_numeric($newstate)) {
                        die("wrong format - state is required and has to be numeric");
                    }
                    updatestate($db, $id, $newstate);
                    ?>
Successfully updated ID=<?php 
                    echo $id;
                    ?>
.
<?php 
                } else {
                    if (isset($_GET['d'])) {
                        $id = $_GET['d'];
                        if (!is_numeric($id)) {
                            die("wrong format - id has to be numeric");
                        }
                        deleteentry($db, $id);
                        ?>
Successfully deleted ID=<?php 
Example #2
0
	  },
	  "responseDetails" : null,
	  "responseStatus" : 200
	}
	<?php 
            } else {
                if (isset($_GET['u'])) {
                    $id = $_GET['u'];
                    if (!is_numeric($id)) {
                        die("wrong format - id has to be numeric");
                    }
                    $newstate = $_GET['state'];
                    if (!is_numeric($newstate)) {
                        die("wrong format - state is required and has to be numeric");
                    }
                    updatestate($mysql_table, $id, $newstate);
                    ?>
	Successfully updated ID=<?php 
                    echo $id;
                    ?>
.
	<?php 
                } else {
                    if (isset($_GET['d'])) {
                        $id = $_GET['d'];
                        if (!is_numeric($id)) {
                            die("wrong format - id has to be numeric");
                        }
                        deleteentry($mysql_table, $db, $id);
                        ?>
	Successfully deleted ID=<?php