A Dynamic site Title


/ Published in: PHP
Save to your folder(s)

A function to make your site title dynamic


Copy this code and paste it in your HTML
  1. <?php
  2. function title(){
  3. if(isset($_GET['classid'])){
  4. echo " | Kategorie -> $_GET[classid]";
  5. }
  6. if(isset($_GET['id']))
  7. echo " | Scripts -> $_GET[id]";
  8. if(isset($_GET['login'])){
  9. echo " | Login";
  10. }
  11. if(strpos($_SERVER['PHP_SELF'], "index.php") !== false)
  12. echo " | Startseite";
  13. if(strpos($_SERVER['PHP_SELF'], "login.php") !== false)
  14. echo " | Login";
  15. if(strpos($_SERVER['PHP_SELF'], "reg.php") !== false)
  16. echo " | Registration";
  17. if(strpos($_SERVER['PHP_SELF'], "scripts.php") !== false && !isset($_GET['classid']) && !isset($_GET['id']))
  18. echo " | Scripts -> Kategorien";
  19. if(strpos($_SERVER['PHP_SELF'], "impressum.php") !== false)
  20. echo " | Impressum";
  21. if(strpos($_SERVER['PHP_SELF'], "kontakt.php") !== false)
  22. echo " | Kontakt";
  23. if(strpos($_SERVER['PHP_SELF'], "services.php") !== false)
  24. echo " | Services";
  25. if(strpos($_SERVER['PHP_SELF'], "nutzungsbestimmungen.php") !== false)
  26. echo " | Nutzungsbestimmungen";
  27.  
  28.  
  29.  
  30.  
  31. }
  32. ?>

URL: http://darksider3.pf-control.de/all/scripts.php?id=Seiten%20Titel%20Dynamisch

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.