Hey,
So i'm doing a small project and I wondered how I can protect a $_GET variable in this class:
I also have a MySQLi class.
So i'm doing a small project and I wondered how I can protect a $_GET variable in this class:
PHP:
<?php
class application {
public $config;
public function __construct() {
$this->loadConfig();
if($_GET['p'] == '' || strlen($_GET['p']) < 1) {
$this->url = 'index';
} else {
$this->url = $_GET['p'];
}
}
}
?>
I also have a MySQLi class.