These simple functions are a big help while developing. Set the DEBUG function to false when in production.
<html>
<head>
<title>Debug Output</title>
<body>
<?php
arrayLog(DEBUG(), "This is Post", $_POST);
outputLog(DEBUG(), "This is txtOne", $_POST['txtOne']);
?>
<form name="frm1" action="#" method="post">
<input type="text" name="txtOne" />
<input type="submit" name="isSubmit" value="Submit" />
</form>
</body>
</head>
</html>
<?php
function DEBUG(){
return true;
}
function arrayLog($debug, $msg, $theArray){
if($debug){
echo "<pre>".$msg.": ";
print_r($theArray);
echo "</pre>";
}
}
function outputLog($debug, $msg, $output){
if($debug){
echo "<br />".$msg.": ".$output."<br />";
}
}
?>