Code: Select all
<?php $variable = $_POST['variable']; ?>So I read that the extract function could do this but is a potential security risk. One is that a would be hacker could add as many fields as they wanted and two they could override existing variables.
So I came up with this in the hopes of making it more secure:
Code: Select all
<?php
if (count($_GET) == 1) {
extract($_GET, EXTR_SKIP);
}
$admin = "FALSE";
echo $text . "<br />" . $admin;
?>