Constants

I am coding a site that includes a game that is played week to week, similar to a fantasy sports site. I have defined constants that are used by various pages, but the value assigned to the certain constants will need to be incremented at the end of the week. Is there a way to use the define function so that it would read a value from a sql table that I could update with a script? I am open to suggestions for an alternative solution as well.

Thank you,

Frank

I think you’re on the right path.

[php]
// Query for new values

define(‘MY_CONST’, $result[‘value’]);

[/php]

Thank you, that worked!

Sponsor our Newsletter | Privacy Policy | Terms of Service