Jump to content

Help with dynamic PHP Page Titles


Patriot

Recommended Posts

Thanks for looking!

 

I am making a public script and I'm wondering how the owner can edit a text file that has the name of the site.  Then, when people view pages, the title will be the name of the site stored in the text file.  I was going to do this with a MySQL query, but figured it makes more sense to retrieve it from a text file.

 

Thanks,

Gil

Link to comment
https://forums.phpfreaks.com/topic/86853-help-with-dynamic-php-page-titles/
Share on other sites

Just have a file named settings.php.

 

Make the file like so:

<?php
$title = "The Coolest Website Ever"; // The name of your site
$other_variable = "true";
...
?>

 

And then include settings.php before any HTML is produced in the main script.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.