Jump to content

Changing Font in PHP Script and adding PHP Includes


mazen

Recommended Posts


I have the following code, I am unsure of where to add the menu php include and how to change the font.  Whenever I insert it somewhere, my website goes blank.

 

<? }

 

include ("footer");

}

 

if ($_GET['a'] == "results") {

 

// added by jigar ... to store the referrer site name ... code begin here //

 

$url = parse_url($_SERVER["HTTP_REFERER"]);

 

if(is_array($url) && $url['host'] != $_SERVER["HTTP_HOST"]){

 

$sql = "Select iReferCount from referrer_sites where vHostName = '".$url['host']."'";

$res = mysql_query($sql);

 

if(mysql_num_rows($res) > 0){

$result = mysql_fetch_array($res);

$iReferCount =  $result["iReferCount"] + 1;

$sql = "Update referrer_sites set iReferCount = '".$iReferCount."' where vHostName = '".$url['host']."'";

$res = mysql_query($sql);

}else{

$sql = "Insert into referrer_sites(`vHostName`, `iReferCount`) values('".$url['host']."','1')";

$res = mysql_query($sql);

}

}

// added by jigar ... to store the referrer site name ... code ends here //

 

include ("header");

$searca = mysql_query("SELECT * FROM danny_search WHERE keywords LIKE '%" . $_REQUEST['search'] . "%'");

$a = mysql_num_rows($searca);

 

echo "<center>There are <b>".$a."</b> results for ".$_POST['search']."<br><br><table cellspacing=\"3\" cellpadding=\"5\" border=\"0\" align=\"center\" width=\"80%\"><tr><td><b> Title</b></td><td><b>Category</b></td><td><b>Site</b></td></tr></center>";

 

$searc = mysql_query("SELECT * FROM danny_search WHERE keywords LIKE '%" . $_REQUEST['search'] . "%'");

while($r = mysql_fetch_array($searc)) {

 

similar_text($_POST['search'], $r[keywords], $p);

 

echo "<tr><td><a href='".$r


."'>".$r[game]."</a></td><td>".$r[platform]."</td><td>".$r[sitename]."</td></tr>";

}

 

echo "</table>";

include ("footer");

}

 

You should be able to do the include at the top of the file and have it display properly. To change the font, you'd have to use HTML and you should probably change it in the include file to keep it well organized. I'm assuming the menu is in HTML right?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.