[HELP] How do I protect against a $_GET variable when using MySQLi [HELP]

Trinix

Member
Feb 1, 2013
56
5
Hey,

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.
 

Users who are viewing this thread

Top