Currently I am creating my website totally dynamic with PHP. Now i want to edit some CSS properties through my Index.php
Inside Index.php i am sending the color of the border to the css file with an session.
session_start();
$_SESSION['CssBorder'] = 'red';
And in my Css file, i take the session
<?php
header('Content-type: text/css');
$CssBorder = $_SESSION['CssBorder'];
?>
And then use it inside css as follow
.Container{
border-left: 1px solid <?php echo $CssBorder ?>;
This is not working, it is not showing the color. and i must have done something else wrong too, since the first CSS property who follows is not being used and everything after that looks as it should be.
Also, i know it works, when i replace the session with just a normal string as following. It works perfect.
$string = 'red';
Why is it not working, and how do i solve this problem?
Thank you very much.
AddHandler .css php-script-type stuff in apache, or named itwhatever.phpso it'll be executed as php code?