mazen Posted March 25, 2007 Share Posted March 25, 2007 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"); } Link to comment https://forums.phpfreaks.com/topic/44192-changing-font-in-php-script-and-adding-php-includes/ Share on other sites More sharing options...
dswain Posted March 25, 2007 Share Posted March 25, 2007 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? Link to comment https://forums.phpfreaks.com/topic/44192-changing-font-in-php-script-and-adding-php-includes/#findComment-214601 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.