Am trying to use PHP to dynamically attach same css sheet to different directory or different path on my site like this.
<!DOCTYPE html >
<html lang="en-GB">
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<?php
if($pagename == 'login.php' || $pagename == 'register.php' || $pagename == 'admin_page.php'){?>
<link rel="stylesheet" href="../css/style.css">
<?php}else{?>
<link rel="stylesheet" href="css/style.css">
<?php}
?>
</head>
Its not working when I tried it, but I really want to know if its possible.
Right here itb says "unexpected end of file"