<?php
if (!empty($_POST) && !empty($_POST['form_id'])) {
if ($_POST['form_id'] == 'my-cool-form') {
// ......
header('location:?');
}
}
?>
<form method="post">
<input type="hidden" name="form_id" value="my-cool-form">
<input type="submit">
</form>
<?php
if (!empty($_POST) && !empty($_GET['form_id'])) {
if ($_GET['form_id'] == 'my-cool-form') {
// ......
header('location:?');
}
}
?>
<form action="?form_id=my-cool-form" method="post">
<input type="submit" name="submit">
</form>
if ( get_magic_quotes_gpc() ) {
$_POST = array_map( 'stripslashes_deep', $_POST );
$_GET = array_map( 'stripslashes_deep', $_GET );
$_COOKIE = array_map( 'stripslashes_deep', $_COOKIE );
$_REQUEST = array_map( 'stripslashes_deep', $_REQUEST );
}