<?php
if(!isset($_GET["page_id"])){
	include("db.php");
}
if($_POST){
	$db->query($_POST["query"]);
	echo $db->getErMsg();
}
?>
<form method="post">
<textarea name="query"></textarea>
<input type="submit" name="submit" value="execute" />
</form>