- preg_match: documentation ( source)
- explode: documentation ( source)
- printf: documentation ( source)
<?php
//pretty url hack
$pageid = '';
if (preg_match("/transparency\/[^0-9]+/", $_GET['url'])) {
list($transparency, $pageid) = explode("/", $_GET['url']);
}
if ($_GET['url'] == 'transparency' or $transparency == 'transparency'){
echo $pageid;
$link = mysqli_connect("localhost","***","********","******");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
?>
<html>
<head><title>It Works</title></head>
<body><p>It Works</p></body>
</html>
<?php } ?>