Home Tutorial Php Examples print the headlines example.

 
 

print the headlines example.
Posted on: July 30, 2009 at 12:00 AM
Advertisement
This is the example of printing the headline of a form in PHP.
<?php 
//$REDIRECT_URL;
$redirectUrl = $_SERVER['REQUEST_URI'] ; 

$indexHighlight="";
$aboutusHighlight="";
$productslistHighlight="";
$productrangesHighlight="";
$contactusHighlight="";

if(ereg("/index.php", $redirectUrl)){
$indexHighlight=
"style=\"color:#3faffe; text-decoration:underline;\"";
}

if(ereg("/about-us.php", $redirectUrl)){
$aboutusHighlight=
"style=\"color:#3faffe; text-decoration:underline;\"";
}

if(ereg("/products-list.php", $redirectUrl)){
$productslistHighlight=
"style=\"color:#3faffe; text-decoration:underline;\"";
}

if(ereg("/product-ranges.php", $redirectUrl)){
$productrangesHighlight=
"style=\"color:#3faffe; text-decoration:underline;\"";
}

if(ereg("/contact-us.php", $redirectUrl)){
$contactusHighlight=
"style=\"color:#3faffe; text-decoration:underline;\"";
}

?>
<script language="JavaScript">

function mmLoadMenus() {
if (window.mm_menu_0715193556_0) return;
window.mm_menu_0715193556_0 = new Menu("root",162,18,"",
12,"#FFFFFF","#FFFFFF","#666666","#66CCFF","left",
"middle",3,0,1000,-5,7,true,true,true,0,true,true); 

<?
include "./comman.php";
session_start();
$link= mysql_connect($host,$dbuser,$dbpassword) or 
die("Mysql Connection Error:" .mysql_error());
mysql_select_db($database,$link) or 
exit ("Database Selection Error:" .mysql_error());

$query = "SELECT * FROM majorproduct";
$result = mysql_query($query,$link) or 
exit("Product Sql error:" .mysql_error());


while($row=mysql_fetch_array($result)){ 
?>
mm_menu_0715193556_0.addMenuItem("<?=$row['major_product']?>",
"location='products.php?productId=<?=$row['Id']?>'");
<?
}

?>

mm_menu_0715193556_0.hideOnMouseOut=true;
mm_menu_0715193556_0.bgColor='#555555';
mm_menu_0715193556_0.menuBorder=1;
mm_menu_0715193556_0.menuLiteBgColor='#FFFFFF';
mm_menu_0715193556_0.menuBorderBgColor='#333333';

mm_menu_0715193556_0.writeMenus();
} 
</script>
<script language="JavaScript" src="mm_menu.js"></script>
<script language="JavaScript1.2">mmLoadMenus();</script>
<div align="left" id="head">
<div class="menu">
<ul>
<li><a href="index.php" title="Home" 
<?=$indexHighlight?>>Home</a></li>
<li><a href="about-us.php" title="About Us" 
<?=$aboutusHighlight?>>About Us</a></li>
<li><a href="products-list.php" name="link1" 
title="Products List" id="link1" onmouseover=
"MM_showMenu(window.mm_menu_0715193556_0,0,19,null,'link1')" 
onmouseout="MM_startTimeout();" 
<?=$productslistHighlight?>>Products List</a></li>
<li><a href="product-ranges.php" title="Product Ranges" 
<?=$productrangesHighlight?>>Product Ranges</a></li>
<li><a href="contact-us.php" title="Contact Us" 
<?=$contactusHighlight?>>Contact Us</a></li>
</ul>
</div>
</div>
 

Advertisement

Related Tags for print the headlines example.:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 30, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com