View Single Post
  #1  
Old 11-29-2009, 12:46 PM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 31,922
Arianna will become famous soon enough
Default Converting the Templates to PHP?

I want to convert my templates to PHP, for a feature that I'm making. You see, the theme url is 'blue.php', and it has a few things which are PHP in it.
What, you ask? Well, this is the code in between the head tags:
PHP Code:
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>:BROWSERTITLE:</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<?php
$sql 
"SELECT * FROM ".$prefix."users WHERE username='".$loggedinname."'";
$result mysql_query($sql);        
$myrow mysql_fetch_array($result);
$stylesheet $myrow['style'];
?>
<link rel="stylesheet" media="screen" type="text/css" href="templates/blue/default.css" title="default" />
</head>
I have this working on another site of mine, but the system doesn't seem to be able to read the actual php file - the css link is shown as:
Code:
templates/blue/blue.php<?php echo $stylesheet ?>.css
This is instead of it echoing the variable. What am I doing wrong?
Reply With Quote