Use this PHP code to pull variables that were just posted, such as from an HTML form:
extract($_POST);
extract($_GET);
It's then a good idea to 'clean' the variables of any html spam or injection attacks. If you're getting ready to insert into MySQL, first make a connection with your database, then do this to your variable(s) (substituting your variable name for 'variable')::
$variable = mysql_real_escape_string($variable);
To get specific variables from GET or POST, you do this (substituting your variable name for 'variable'):
$variable = $_POST['variable'];
$variable = $_GET['variable'];
To show all your active, set, variables, use this:
var_dump(get_defined_vars());