Topic: user top -- php in head tags ?

here is the coding....
-----------------------------------------------------

<?php // $Id: user_top.php,v 2.14 2007/08/20 18:54:54 pat Exp $            // ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="freerealty.css" type="text/css">
<link rel="shortcut icon" type="image/x-icon" href="./images/favicon.ico">
<!--[if IE]>
<link rel="stylesheet" href="ie_freerealty_hacks.css" type="text/css">
<![endif]-->
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

<?php
$baseurl = config_options('baseurl');
$admin_path = config_options('admin_path');
$imageloc = config_options('imageloc');

  if (isset($query_data['title']))
   {
    $urltitle = unquote($query_data['title']);
   }
  if (isset($query_data['agent']))
   {
    $urlagent = unquote($query_data['agent']);
   }
  else
  {
   $urlagent = "";
  }
  if (isset($urltitle) && isset($urlagent))
   {
    $urltitle = $urltitle." presented by ".$urlagent. ":";
   }
  else
   {
    $urltitle = $urlagent. " :";
   }
  echo "<title>" .$urltitle." FreeRealty</title>";
?>
</head>

-------------------------------------------------------------------

why is the php inside of the head tags?


and why the lonely <p> tag at the bottom of the page,,,i haven't found a reason yet to have the paragraph tag,,,no closing  in the main or user bottom that would require the tag in the top...

Re: user top -- php in head tags ?

Answered !!
It makes no difference where the code is,,,it still parses ok..
but considering my OCD I placed it into the body of the doc,,
so the answer is just remove it and place it right under the body tag and it still
works great.....

Re: user top -- php in head tags ?

bestnametaken wrote:

Answered !!
It makes no difference where the code is,,,it still parses ok..
but considering my OCD I placed it into the body of the doc,,
so the answer is just remove it and place it right under the body tag and it still
works great.....

The php is attempting to set your title tags based upon the agent name and the home information in the database. Moving it outside the head tag likely breaks the title bar settings.

Patrick
Lead developer FreeRealty
Other claims to fame: http://www.rwcinc.net
Enrolled Agent, Licensed to Represent Taxpayers before Exams, Appeals and Conference divisions of the Internal Revenue Service.

Re: user top -- php in head tags ?

Oh !! I see what your saying,,,it just adds agent name and listing info to the title bar,,,ok ,, it works either way,,doesn't seem to make a difference..i have two test sites up and running one with my mods and one un modded...
works on both....not used to seeing php code in the head...threw me into a spin..