w00t php library

A simple php library.

Code

Installation

Include w00t.php in your extension.

Functions

chk_get(get key)

chk_get() is shortcode for isset and comparison.

// With chk_get

<?php
if(chk_get("input") == "normal") {
	echo 'input is normal';
}
?>

// Without chk_get

<?php
if(isset($_GET["input"]) && $_GET["input"] == "normal") {
	echo 'input is normal';
}
?>

chk_post(post key)

chk_post() is shortcode for isset and comparison.

// With chk_post

<?php
if(chk_post("input") == "normal") {
	echo 'input is normal';
}
?>

// Without chk_post

<?php
if(isset($_POST["input"]) && $_POST["input"] == "normal") {
	echo 'input is normal';
}
?>