php url get
Posted: Thu Dec 24, 2015 3:50 pm
rather than something like:
http://www.mydomain.me/index.php?state= ... p#Berkeley
You can treat the named anchor as a query string like this:
http://www.mydomain.me/index.php?state= ... y=Berkeley
Then, access it like this:
so given those two containers are known, this probably the best wey to leverage PHP URLs
so that content can be assembled before its returned via ECHO
but i think some parser should be used to make sure city and state are valid etc
http://www.mydomain.me/index.php?state= ... p#Berkeley
You can treat the named anchor as a query string like this:
http://www.mydomain.me/index.php?state= ... y=Berkeley
Then, access it like this:
Code: Select all
$Url = $_GET['state']."#".$_GET['city'];so that content can be assembled before its returned via ECHO
Code: Select all
<?php
if (isset($_GET['link'])) {
echo $_GET['link'];
}else{
// Fallback behaviour goes here
}