Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how can I use bread crumb in PHP ?

Answers were Sorted based on User's Feedback



how can I use bread crumb in PHP ?..

Answer / latha

<?php
session_start();
include("./Breadcrumb.php");
$trail = new Breadcrumb();
$trail->add('Home', $_SERVER['PHP_SELF'], 0);

//Sample CSS
echo "
<style>
#breadcrumb ul li{
list-style-image: none;
display:inline;
padding: 0 3px 0 0;
margin: 3px 0 0 0;
}
#breadcrumb ul{
margin:0;padding:0;
list-style-type: none;
padding-left: 1em;
}
</style>
";

//Now output the navigation.
$trail->output();
?>

Is This Answer Correct ?    0 Yes 0 No

how can I use bread crumb in PHP ?..

Answer / asim shariff

create a session array variable in the homepage or index page,

$_SESSION['page_name']= array();


index.php :-

$_SESSION['page_name'][]=array('title'=>'Home','page'=>'index.php');



contact_us.php :-

$_SESSION['page_name'][]=array('title'=>'Contact Us
','page'=>'contact_us.php');


similarly for all the pages.

where you want to display the bread crumb just paste this code.

foreach($_SESSION{'page_name'] as $brdcrum)
{
echo '<a
href="'.$brdcrum['page'].'">'.$brdcrum['title']."</a>&nbsp;>>&nbsp;";
}

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More PHP Interview Questions

What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?

0 Answers  


What is crypt () in php?

0 Answers  


Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?

0 Answers  


how to display and include the user system date/time in a php program/project

1 Answers   Wipro,


Is php faster than python?

0 Answers  


Do you know what does $globals means?

0 Answers  


Why do we use polymorphism in php?

0 Answers  


Write the statements that are used to connect php with mysql

0 Answers  


Can anybody plz tell me if there any recruitment on php plz mail to vasudev.adepu@gmail.com.i had completed M.SC(MATHS) in 2007 . trying to get a job on php. i have good knowledge on PHP/MYSQL

1 Answers  


Is array a key php?

0 Answers  


How to close a session properly?

0 Answers  


i start a new session with : session_start(); then i set some session variable like this : $_SESSION['name']=$_POST['name'];\ and some another variables. at bottom of page i set header to diffrent page : header('location: index.php'); exit(); now in new page (index.php i can't access to my session variables, like $_SESSION['name']) what's wrong ? thanks. here is my files : a.php ======================================== session_start(); require ('config.inc.php'); if(isset($_POST)) foreach($_POST as $v=>$k) { $items[$v]=$k; } $sql="SELECT * FROM members WHERE username='{$items['user']}' AND pass=MD5('{$items['Password']}') "; $res=mysql_query($sql); $row=mysql_fetch_assoc($res); if($row['username']) { $_SESSION['type']=$row['type']; $_SESSION['name']=$row['name']; $_SESSION['family']=$row['family']; $_SESSION['username']=$row['username']; $_SESSION['date']=$row['date']; } header('location: admin.php'); exit(); ====================================== admin.php ===================================== <?php session_start(); if(!isset($_SESSION['admin'])) { header('location: index.php'); exit(); } require ('config.inc.php'); ?> . . . =================================

5 Answers  


Categories