Skip to main content

Posts

Showing posts with the label Php Coding

Php Navigation Basic codes for Websites

Here, friends, I am sharing some most prevailing common codes used in php webpages navigation for calling /loading/including paths/query strings. <?php if($_SERVER['QUERY_STRING'] == "SoD")  print "owns you!"; else  print "don't front!"; ?> Description: Instead of calling files like ( index.php?str=blah ) , you could do ( index.php?SoD ) and it would print out "owns you!". You can add more strings in there, this is just an example.    $vars = explode(",", urldecode(getenv('QUERY_STRING')));    $v1 = array_shift($vars);    $v2 = array_shift($vars);    $v3 = array_shift($vars);    switch ($v1) {        case 'first.1': {            print("This is v1, first string case 'file.php?first.1'.");            break;            }       case 'first.2': {       swit...