When I run this code:
<?php
if (preg_match('/^[a-z0-9]+$/', $_GET['p'])) {
$page = realpath("includes/$_GET[p].php");
if ($page) {
include $page;
}
}
?>
I get this error:
Notice: Undefined index: p in index.php on line 3
What am I doing wrong?