Best way to do this?

Hi guys

just wondering what the best way is to do something like this

basically i have a html page with a general registration form onit. The form page also has other information in css blocks

i wanted to create some sort of configuration file where you can change certain fields on the form from this file and also choose turn css blocks on a off by setting a boolean of 1 for on and 0 for off

is this possible? and if so can you point me in the right direction of how this is to be done


It only requires the most basic knowledge of PHP - basic if/else logic and the definition of a few variables.

$field1 = 1;
$field2 = 0;
$css = ''; // $css is a string to fill with the CSS to be output at the end

if ($field1) {
  echo '<some html>';
  $css .= 'some css';
if ($field2) {
  echo '<some more html>';
  $css .= 'more css';

// CSS output
file_put_contents('thecssfile.css', $css, FILE_APPEND);

Of course it can be made more “advanced” and complicated, but at its most basic level, that’s how I’d go about it.

thanks…i will try that