Jump to content

Search the Community

Showing results for tags 'breadcrumbs'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 3 results

  1. I've been trying to make a breadcrumbs navigation for a simple website which uses GET variables to determine what content to display, but it's proving a little bit more tricky than I thought. I've typed up a simple code already, but I'm looking to improve it and make it more dynamic: <?php $url_vars = array();//the correct GET variables $url_vars[0] = 'girls';//www.mywebsite.com/girls $url_vars[1] = 'boys';//www.mywebsite.com/boys $url_exp = explode('/', $_SERVER['REQUEST_URI']); $url_path = array(); foreach($url_exp as $shard){ foreach($url_vars as $var){ if($var == $shard){ $url_path[] = $shard; break; } } } require 'pre_breadcrumbs.html';//displays home crumb foreach($url_path as $crumb){ echo ' -> '; $full_crumb = ucfirst($crumb); require 'breadcrumbs.html';//creates all the crumbs } ?> Any ideas? Thanks.
  2. Hello All geeks I am a newbie - i need to set up breadcrumbs on my website- i tried and got to a certain stage, which is good. But i need expert help to help me out to finish it off. Please let me know if any of you generous people can help me out with this, I will then post the details of the website and the code. Thanks well in advance. Sumit
  3. I have a crude eCommerce website i am building (the-jewelry-district.com/store) and i want to create a breadcrumbs script. here is my product.php page. im not sure if i need the script on my index.php as well. right now i have a simple echo of the categories and sub categories in the table from the database. 7 fields to be exact. Here they are as defined in the script below: $category = $row["category"]; $subcategory = $row["subcategory"]; $sub_subcategory_1 = $row["sub_subcategory_1"]; $sub_subcategory_2 = $row["sub_subcategory_2"]; $sub_subcategory_3 = $row["sub_subcategory_3"]; $sub_subcategory_4 = $row["sub_subcategory_4"]; $sub_subcategory_5 = $row["sub_subcategory_5"]; The problem is if the product only requires "category", "subcategoty" & "sub_subcategory_1" only then the end result is something like this: Category | Subcategory | Sub-Subcategory_1 | | | | | I use " | " as the heirachy separator so at the end, the echo still prints these. I based my site off of a 20 video ecommerce php & MySQL tutorial on youtube by a gentleman by the name of Adam Khoury in case you guys are wondering where I got this code from. Here is the entire product.php script I have. The while loop pretty much describes the table I use for my products. <?php include "storescripts/script_error_reporting.php"; /*Check to see the URL variable is set and that it exists in the database*/ if (isset($_GET['id'])) { // Connect to the MySQL database include "storescripts/connect_to_mysql.php"; $id = ($_GET["id"]); /*Use this var to check to see if this ID exists, if yes then get the product details, if no then exit this script and give message why*/ $sql = mysql_query("SELECT * FROM products WHERE id='$id' LIMIT 1"); $productCount = mysql_num_rows($sql); // count the output amount if ($productCount > 0) { /*get all the product details*/ while($row = mysql_fetch_array($sql)){ $product_name = $row["product_name"]; $browser_tab_title = $row["browser_tab_title"]; $url_name = $row["url_name"]; $price = $row["price"]; $details = $row["details"]; $category = $row["category"]; $subcategory = $row["subcategory"]; $sub_subcategory_1 = $row["sub_subcategory_1"]; $sub_subcategory_2 = $row["sub_subcategory_2"]; $sub_subcategory_3 = $row["sub_subcategory_3"]; $sub_subcategory_4 = $row["sub_subcategory_4"]; $sub_subcategory_5 = $row["sub_subcategory_5"]; $image_a = $row["image_a"]; $image_b = $row["image_b"]; $image_c = $row["image_c"]; $image_d = $row["image_d"]; $date_added = strftime("%b %d, %Y", strtotime($row["date_added"])); } } else { echo "That item does not exist."; exit(); } } else { echo "Data to render this page is missing."; exit(); } mysql_close(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo $browser_tab_title; ?></title> <link rel="stylesheet" href="style/style.css" type="text/css" media="screen" /> </head> <body> <?php include_once("template_header.php");?> <div id="breadcrumbs"> <p> <?php echo "$category | $subcategory | $sub_subcategory_1 | $sub_subcategory_2 | $sub_subcategory_3 | $sub_subcategory_4 | $sub_subcategory_5"; ?> <br /> </p> </div><!--breadcrumbs--> <!--PERMANENT ABOVE--> <div id="prodcont"> <div id="product"> <div id="productContent"> <div class="prodimgl"> <img src="inventory_images/<?php echo $image_a; ?>.jpg" width="300" height="300" > <img src="inventory_images/<?php echo $image_b; ?>.jpg" width="300" height="300" > <!--<img src="inventory_images/<?php echo $image_c; ?>.jpg" width="300" height="300" >--> <p>View Full Size Image</p> <a href="inventory_images/<?php echo $image_a; ?>.jpg" target="_blank">A</a> <a href="inventory_images/<?php echo $image_b; ?>.jpg" target="_blank">B</a> <!--<a href="inventory_images/<?php echo $image_c; ?>.jpg" target="_blank">C</a>--> </div><!--prodimg1--> <div class="proddesc"> <h1> <?php echo $product_name; ?> </h1> <div id="productDescription"> <?php echo $details; ?> <br /> <?php echo "$".$price; ?> <br /> <br /> <br /> </p> <form id="form1" name="form1" method="post" action="cart.php"> <input type="hidden" name="pid" id="pid" value="<?php echo $id; ?>" /> <input type="submit" name="button" id="button" value="Add to Shopping Cart" /> </form> </div><!--productDescription--> </div><!--proddesc--> </div><!--productContent--> </div><!--product--> </div><!--prodcont--> <?php include_once("template_footer.php");?> </body> </html>
  • 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.