I am making a website with PHP and have encountered an issue.
-
All my webpages
includea footer, and I want to display data in the footer depending on the opened webpage, I found a very non-robust way of doing this.if( $CU == 'http://www.example.com' || $CU == 'http://example/index.php' || $CU == 'http://example/index.php/' || $CU == 'http://example/') { $display = "<p>Already registered? <a href='login.php'>Sign in</a></p>"; } elseif( $CU == 'http://ift.tt/1IGJxDG' || $CU == 'http://ift.tt/1mNFg9X' ) { $display = "<p>Forgotten your password? <a href='reset_password.php'>Reset</a> your password!</p>"; }
Question (edited): What is a robust method of dynamically loading content based on the current file?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire