PHP - Dynamic Page Title (product Description)
Similar TutorialsHi there, I'm trying to get the full Product Name in the <title> of each of the product pages - I can't seem to figure out what to put in the product_info.php... I've tried a few different options but I'm not great with php Here's what I have currently but it creates errors... <script language="javascript"><!-- document.write('<title><?php echo TITLE; ?> : <?php echo $product_info['products_name']; ?> </title>'); //--></script> Hope someone can help - thanks so much! I have a product page which populates all my products in one page. I have also a detail page which gives details on a product which i wanted to know. My problem is when I am going to click on the product that I want the detail page shows incorrect product details. I just want one detail product page so that it will be easy to edit the page in the future. I am asking an Idea on how to make one detail page in all of my products.. thanks... I have a website here [redacted] and it is an affiliate website where I just find products and promote them. All I have to do is give product a title, affiliate url, the description, an image and a price. I am trying to make the product description area hold more text than it does now, because at the moment in the admin side of my website it says "product description 275 max characters" That is really a short sentence. Can anyone please help me I have no php skills but really wish I did, if you need more info I will be happy to share anything I need to. Edited October 27, 2019 by requinixremoved link I have written the following php statement and it works to show pages titles if I have an id in the url example. www.mysite.com/index.php?id=3 then the right page title is displayed but if I am on my home page www.mysite.com with no id the page title isn't displayed. I am running the code in the header in the title brackets. here is the code. The last else doesn't display my home page title any help would be great thank you very much... <title> <? if (isset($_GET['id'])) if($_GET['id'] == '1') { echo "LBT Services Page"; } else if($_GET['id'] == '2') { echo "About LBT"; } else if($_GET['id'] == '3') { echo "Contact LBT"; } else if($_GET['id'] == '4') { echo "Your Message to LBT has been Submitted"; } else if($_GET['id'] == '5') { echo "LBT Links Page"; } else if($_GET['id'] == '6') { echo "LBT Back-UP Plans"; } else { echo "LBT Home page"; } ?></title> Does anyone know how I would display a dynamic page title to my content pages? I currently have my index.php displaying the title for my page, but the content that i am displaying dynamicly also uses this title, want these pages to have their own titles.. Thanks Hi I am trying to pull title and meta description from an URL.. To pull the URL I am using the code from http://www.dreamincode.net/code/snippet4625.htm... function getTitle($Url){ $str = file_get_contents($Url); if(strlen($str)>0){ preg_match("/\<title\>(.*)\<\/title\>/",$str,$title); return $title[1]; } } //Example: echo getTitle("http://www.cnn.com"); And to pull the meta description I am using the code from http://php.net/manual/en/function.get-meta-tags.php. // Assuming the above tags are at www.example.com $tags = get_meta_tags('http://www.cnn.com/') or die("Could not fetch meta tags"); // Notice how the keys are all lowercase now, and // how . was replaced by _ in the key. echo $tags['author']; // name echo $tags['keywords']; // php documentation echo $tags['description']; // a php manual echo $tags['geo_position']; // 49.33;-86.59 So my complete code looks like this: <html> <head> </head> <body> <?php function getTitle($Url){ $str = file_get_contents($Url); if(strlen($str)>0){ preg_match("/\<title\>(.*)\<\/title\>/",$str,$title); return $title[1]; } } //Example: echo getTitle("http://www.cnn.com"); // Assuming the above tags are at www.example.com $tags = get_meta_tags('http://www.cnn.com/') or die("Could not fetch meta tags"); // Notice how the keys are all lowercase now, and // how . was replaced by _ in the key. echo $tags['author']; // name echo $tags['keywords']; // php documentation echo $tags['description']; // a php manual echo $tags['geo_position']; // 49.33;-86.59 ?> Test! </body> </html> But it wont work... All I get is "Could not fetch meta tags".. I've tried different URLs and such but still wont work .. Anyone have an idea? On the index page of http://www.sportskevesti.co i have the meta tags of Title, Description, Keyword.... and other element, but it is necessary to show them in name of the other pages, socer, basketbal, handbal, tennis...., and there fore news spetial. in this moment, i have this meta tag double. for example: www.sportskevesti.co/index.php Quote <meta name="title" content="Sportske Vesti"> <meta name="description" content="Najnovije sportske vesti iz Srbije i ostatka sveta. Sve na jednom mestu."> <meta name="keywords" content="sport, vesti, fudbal, tenis, kosarka, odbojka, rukomet, auto, moto, trke"> http://sportskevesti.co/index.php?opcija=vest&vest_id=60067 Quote <meta name="title" content="Sportske Vesti"> <meta name="description" content="Najnovije sportske vesti iz Srbije i ostatka sveta. Sve na jednom mestu."> <meta name="keywords" content="sport, vesti, fudbal, tenis, kosarka, odbojka, rukomet, auto, moto, trke"> <meta name="title" content="Danas je derbi!" /> <meta name="description" content="Na stadionu Crvene zvezde danas se igra ..." /> <meta name="keywords" content="danas, derbi, "/> Since I assume that this is not good for SEO optimization, how to avoid this and show only one meta per page ? I feel like a moron asking this question as it seems to be one of the most common things done with php but I cannot find a tutorial (probably because I don't know the correct wording to search under) on this specific thing.. Anyhow. I'm spitting out a list of the Titles of my test table like so (and its working as expected): <?php $posting_sql = "SELECT * FROM postings"; $posting_results = (mysqli_query($cxn, $posting_sql)) or die("Was not able to grab the Postings!"); while($posting_row = mysqli_fetch_array($posting_results)) { echo "<li><a href='posting_details.php'>$posting_row[title]</a></li>"; } ?> Now as you can see: <a href='posting_details.php'> I am calling a new page, and that page contains this: <h2><?php echo "$posting_row[title]"; ?></h2> <p><?php echo "$posting_row[description]"; ?></p> It's no surprise it's not working (with many variations etc), but I am only familiar with using <form> GET or POST, and these of course are not form elements, so I cant seem to call them the same way. My suspicion (and from the research data I could find) is that I need to pass values in my link: <a href='posting_details.php'> ... I could not get it to work, but I was trying variations like: <a href='posting_details.php?get[title&get[description]]'> but it seems like I am screwing things up even more by doing this.. Anyhow. If anyone could show me a tutorial that covers this specifically or some suggestions on the best approach to this would be much appreciated.. I know this topic is everywhere but I cant find a solution to my particular problem. I have been using a download center script for about a year. http://download.redgalaxy.net/ However, the title is static, keeping with the predefined one. I am trying to get the title to change so it matches the file name shown on the display page "index.php/?nav=display&file=25". I have spent days trying to figure something out with absolutely no luck. Does anyone have an idea how to get the title to change when dynamically? Out of desperation i used an onload javascript but it doesnt work with crawlers. Thank you in advanced. Index.php <?php /* PHP Download Center Copyright (C) 2007 Chris LaPointe This program is free softwa you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ //error_reporting(E_ERROR); define("PHP_DOWNLOADCENTER", 1); include_once('settings.php'); //Include all files in 'inc' directory $path = 'inc/'; $handle = opendir($path); while (false !== ($file = readdir($handle))) { if (substr($file, 0, 1) != '.') include($path.$file); } closedir($handle); //Start session for me! session_start(); if (mysql_connect($mysql_host, $mysql_username, $mysql_password) == FALSE){ if (file_exists("install.php")){ echo '<HTML><HEAD><meta http-equiv="refresh" content="0;url=install.php"></HEAD></HTML>'; exit; }else{ die("Fatal error. Unable to access database. In addition, unable to go to install.php to setup access!"); } } if (mysql_select_db($mysql_database) == FALSE){ if (file_exists("install.php")){ echo '<HTML><HEAD><meta http-equiv="refresh" content="0;url=install.php"></HEAD></HTML>'; exit; }else{ die("Fatal error. Unable to access database. In addition, unable to go to install.php to setup access!"); } } //because of the way it is handled, there should never be any HTML passed via arguments //do a check here foreach ($_GET as $key => $value){ $_GET[$key] = strip_tags(html_entity_decode($value, ENT_NOQUOTES), '<i><b>'); } //Run the now (Just code, ie login code) if ( isset($_GET['now']) ){ $nowfile = "pages/".$_GET['now'].'.now.php'; if (file_exists($nowfile)){ include($nowfile); }else{ echo "<b>Warning:</b> Now file '$nowfile' doesn't exist"; } } ?> <HTML> <HEAD> <TITLE><?php echo $page_title; ?></TITLE> <link rel="stylesheet" type="text/css" href="style.css"> </HEAD> <BODY> <!--TOP SECTION (banner)--> <table width=100% border=0 cellspacing=2 cellpadding=0> <TR> <TD valign="top"><img src="theme/page/banner.gif"></TD> <TD valign="middle"><div align="right"><?php include('ads/ad_top.php'); ?></div></TD> </TR> </TABLE> <!--MIDDLE SECTION--> <table width=100% border=0 cellspacing=2 cellpadding=0> <TR> <TD width=150px valign="top"><?php require('left.php'); ?></TD> <TD valign="top"> <table width=100% border=0 cellspacing=2 cellpadding=0> <TR><TD><?php include('nav.php'); ?></TD></TR> <TR><TD><?php include('body.php'); ?></TD></TR> </table> </TD> </TR> </table> <BR> <div align="center"><font size="1"> This page is under the <a href="http://gplv3.fsf.org/">GPLv3</a> by <a href="http://www.redgalaxy.net" target="_blank">Red Galaxy</a>. Each file is copyrighted by its respective owner.<BR> This page is not to be held responsible for any uploaded files. It is each user's responsibility to check the legality of files they upload.<BR> Please contact <i><?php echo $info_name; ?></i> at <?php echo str_replace('@', "'AT'", str_replace('.', "'DOT'", $info_email)); ?> with any questions.<BR> <?php echo $info_misc; ?></font> </div> </BODY> </HTML> <?php mysql_close(); ?> nav.php <?php if (!defined('PHP_DOWNLOADCENTER')) exit; ?> <table width=100% border=0 cellspacing=0 cellpadding=0> <TR> <TD> <a href="?nav=home">Home</a> | <a href="?nav=recent">Recent Files</a> </TD> <TD align="right"> <form action="?nav=search_results" method="post"><INPUT type="text" size="20" name="search"><INPUT type="submit" value="Search"></form> </TD> </table> body.php <?php if (!defined('PHP_DOWNLOADCENTER')) exit; if (!isset($_GET['nav'])){ $location = 'pages/home.php'; }else{ $location = 'pages/'.$_GET['nav'].'.php'; } if (isset($_GET['message'])){ echo '<div align="center">'; echo BeginBorder("Message", "50%"); echo stripslashes(urldecode($_GET['message'])); echo EndBorder(); echo '</div>'; } if (file_exists($location)) include($location); else include("pages/404.php"); ?> display.php <?php $fid = $_GET['file']; $results = mysql_query("SELECT * FROM files WHERE id=$fid LIMIT 1"); if (mysql_numrows($results) == 0){ echo "File not found. It may have been removed."; return; } $who = getUserNameById(mysql_result($results,0,"uid")); echo BeginBorder(mysql_result($results, 0, "title"), "90%"); ?> <TABLE width=100% border=0 cellspacing=0 cellpadding=0> <TR><TD width=50% valign="top"> <TABLE width=100% border=0 cellspacing=1 cellpadding=2> <TR bgcolor=#F0F0F0> <TD width=50%>Name:</TD> <TD><?php echo mysql_result($results, 0, "title"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>File:</TD> <TD><?php echo mysql_result($results, 0, "filename"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Size:</TD> <TD><?php echo round( mysql_result($results, 0, "filesize")/1024/1024,2).'MB'; ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Extension:</TD> <TD><?php echo mysql_result($results, 0, "filetype"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Category:</TD> <TD><?php echo mysql_result($results, 0, "category"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>User:</TD> <TD><?php echo $who; ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Date Uploaded:</TD> <TD><?php echo mysql_result($results, 0, "date"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Download Count:</TD> <TD><?php echo mysql_result($results, 0, "dcount"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Downloads This Month</TD> <TD><?php echo mysql_result($results, 0, "dmonth"); ?></TD> </TR> </TABLE> </TD> <TD valign="top"> <center> <a href="<?php echo '?nav=download&file='.$fid; ?>"><img src="theme/download.png" border=0></a> <?php if (mysql_result($results, 0, 'private') == '1') echo "<br>You must be logged in to download this file.</b>"; ?> </center><BR><BR> <?php //PREVIEW IMAGE IF EXISTS $realname = mysql_result($results, 0, "filename"); $small_preview = 'images/'.$realname.'.small.jpg'; $large_preview = 'images/'.$realname.'.large.jpg'; if (file_exists($small_preview)){ echo "<div align='center'><a href='$large_preview' target='_blank'><img src='$small_preview' border='0'></a></div><BR>"; } //ADMIN CONTROLS if (isUserAdmin()){ echo '<b>Admin:</b> <a href="?nav=delete&file='.$fid.'">Delete This File</a> | <a href="?nav=edit&file='.$fid.'">Edit</a><BR>'; } ?> </TD></TR> </TABLE> <HR> <b>Description:</b><BR> <?php echo mysql_result($results, 0, "description"); ?> <?php echo EndBorder(); ?> Hello All, I am new to php and programming in general. My question is as follows. I have created a header.inc.php and the index.php which includes header.inc.php. I have title set in header.inc.php under the "head". Code: [Select] <title><?php echo $title; ?> In the index.php, I have set variable $title to "Home Page" $title = "Home Page"; But whenever I visit index.php, the title is never called. Is it because the header has no clue where the $title is? Hello group,
Apologies if this has been asked. I have a site that is generating pages like this:
http://www.example.c...products_id=001 G'day all, i've got this script that I found on the net some time back but not entirely sure where, however it works well except I want to add a feature so it shows the image details from a txt file. Here is the gallery script: <?php function getDirectory( $path = '.', $level = 0 ){ $ignore = array( 'cgi-bin', '.', '..' ); $dh = @opendir( $path ); while( false !== ( $file = readdir( $dh ) ) ){ if( !in_array( $file, $ignore ) ){ if( is_dir( "$path/$file" ) ){ $dir = $path . $file; echo "<h2>$file</h2><p>"; $dh1 = @opendir( $dir ); while( false !== ( $image = readdir( $dh1 ) ) ){ if( !in_array( $image, $ignore ) ){ if( !is_dir( "$dir/$image" ) ){ if (preg_match("/.jpg/", $image)) { echo "<a href=\"$dir/$image\" rel=\"lightbox\"><img src=\"gallery-thumbnail.php?file=$file/$image\" border=2 style='border-color: #981C1E'></a>\n"; } } } } echo "</p>"; $level++; } } } closedir( $dh ); } getDirectory('gallery/'); ?> Now, what i'm wanting is to read a txt file either in the root or 'gallery' directory, where it has the file name, title, description, photographer. (something like filename.jpg|title of image|description about image|J King). so when the image is displayed, a script reads the text file and will show the image info beside it. Now i've got this bit of snippet from an old script I used once, but can't seem to get it to work anywhere, so any help is greatly appreciated. $text = "gallery.txt"; $fh=fopen($text, "r"); while(!feof($fh)) { $temp = explode("|", $line); $title[$temp[0]] = $temp[1]; $description[$temp[0]] = $temp[2]; $photographer[$temp[0]] = $temp[3]; $line=fgets($fh); unset($temp); } Hi. This question is building off of things you all helped me with earlier in my other two threads. (I go no sleep last night, so sorry if my thinking is a bit off!) Now that I know how to create a gallery page - as far as HTML goes - to display a listing of free add-on items you get when you subscribe, I need to extend those concepts to my next project. I need to create a product catalog page for my e-commerce site. (Not sure if there is a better name?) This is the page you would see if you went to an e-commerce site and started shopping. At the top of the page would be my company mast. And beneath that, on the left side of the screen would be a menu listing different areas of my online store. And to the right, would be the area where you see the actual products. (And I would be using the same techniques to display items on the right hand side as I did in my earlier gallery. So here is where I could use some hep with the logic of this page... Let's say my website is located at www.mystore.com And in the left menu bar, I have these categories: Music, TV Shows, Movies, Gear And in the right pane I want to display items for the chosen section. So if you chose "Music", I am thinking the hyperlink behind it might read; www.mystore.com/music/ with a mod_rewrite to www.mystore.com?category=music And then I would have PHP code that would fire when the page is reloaded to www.mystore.com?category=music and it would query MySL and display all music related products in the right pane. (Note: It is understood I am only using HTML and PHP with no Javascript.) How does the above approach sound?
Hello. I just created a product gallery containing thumbnails of items that I will be selling. When a user click on on of the thumbnails, I want a product details page to appear with more details about the chosen product Could use some feedback if I am going about things the right way... Step 1: User goes to my gallery located he www.mysite.com/store/product-gallery.php Step 2: System displays a page of thumbnails representing items that I am selling. Step 3: User click on a given thumbnail which is a hyperlink to: www.mysite.com/store/products/4571 Step 4: System rewrites the URL as such: www.mysite.com/store/products.php?sku=4571 Step 5: System queries MySQL and retrieves record for sku 4571 Step 6: System displays product details for the chosen item in Step 3 which is sku 4571
How does that sound?
Hi,
I have this snippet in my page:
<?php echo $EM_Booking->get_price(true) * $EM_Booking->get_spaces(); ?>The page executes with no hitches except the price is not multiplied by the spaces. I get and echo of "0". I'm new to this. Any help would be greatly appreciated and thanks! I would like to customize my product-list page to display all my products in a grid with an ADD TO CART option for each product. That means i have two ADD TO CART button on the site, in productDetail.php there is a ADD TO CART button original from the tutorial, i need customize another ADD TO CART button on productList.php. Does anyone know how to accomplish this customization? . Please help because I am stuck with the coding for 3weeks Tutorial site: http://www.phpwebcommerce.com/plaincart/index.php productDetail.php: Code: [Select] <?php if (!defined('WEB_ROOT')) { exit; } $product = getProductDetail($pdId, $catId); // we have $pd_name, $pd_price, $pd_description, $pd_image, $cart_url extract($product); ?> <table width="100%" border="0" cellspacing="0" cellpadding="10"> <tr> <td align="center"><img src="<?php echo $pd_image; ?>" border="0" alt="<?php echo $pd_name; ?>" width="230" height="170"></td> <td valign="middle"> <strong><?php echo $pd_name; ?></strong><br> Price : <?php echo displayAmount($pd_price); ?><br> <?php // if we still have this product in stock // show the 'Add to cart' button if ($pd_qty > 0) { ?> <input type="button" name="btnAddToCart" value="Add To Cart >" onClick="window.location.href='<?php echo $cart_url; ?>';" class="addToCartButton"> <?php } else { echo 'Out Of Stock'; } ?> </td> </tr> <tr align="left"> <td colspan="2"><?php echo $pd_description; ?></td> </tr> </table> productList.php: Code: [Select] <?php if (!defined('WEB_ROOT')) { exit; } $productsPerRow = 2; $productsPerPage = 8; //$productList = getProductList($catId); $children = array_merge(array($catId), getChildCategories(NULL, $catId)); $children = ' (' . implode(', ', $children) . ')'; $sql = "SELECT pd_id, pd_name, pd_price, pd_thumbnail, pd_qty, c.cat_id FROM tbl_product pd, tbl_category c WHERE pd.cat_id = c.cat_id AND pd.cat_id IN $children ORDER BY pd_name"; $result = dbQuery(getPagingQuery($sql, $productsPerPage)); $pagingLink = getPagingLink($sql, $productsPerPage, "c=$catId"); $numProduct = dbNumRows($result); // the product images are arranged in a table. to make sure // each image gets equal space set the cell width here $columnWidth = (int)(100 / $productsPerRow); ?> <table width="100%" border="0" cellspacing="0" cellpadding="20"> <?php if ($numProduct > 0 ) { $i = 0; while ($row = dbFetchAssoc($result)) { extract($row); if ($pd_thumbnail) { $pd_thumbnail = WEB_ROOT . 'images/product/' . $pd_thumbnail; } else { $pd_thumbnail = WEB_ROOT . 'images/no-image-small.png'; } if ($i % $productsPerRow == 0) { echo '<tr>'; } // format how we display the price $pd_price = displayAmount($pd_price); echo "<td width=\"$columnWidth%\" align=\"center\"><a href=\"" . $_SERVER['PHP_SELF'] . "?c=$catId&p=$pd_id" . "\"><img src=\"$pd_thumbnail\" border=\"0\" width=\"230\" height=\"170\"><br>$pd_name</a><br>Price : $pd_price<br>"; // format display add to cart echo "<input type=\"button\" name=\"btnAddToCart\" value=\"Add To Cart >\" onClick=\"window.location.href='<?php echo $cart_url;?>';\" >"; // if the product is no longer in stock, tell the customer if ($pd_qty <= 0) { echo "<br>Out Of Stock"; } echo "</td>\r\n"; if ($i % $productsPerRow == $productsPerRow - 1) { echo '</tr>'; } $i += 1; } if ($i % $productsPerRow > 0) { echo '<td colspan="' . ($productsPerRow - ($i % $productsPerRow)) . '"> </td>'; } } else { ?> <tr><td width="100%" align="center" valign="center">No products in this category</td></tr> <?php } ?> </table> <p align="center"><?php echo $pagingLink; ?></p> Product-functions.php: Code: [Select] <?php require_once 'config.php'; /********************************************************* * PRODUCT FUNCTIONS **********************************************************/ /* Get detail information of a product */ function getProductDetail($pdId, $catId) { $_SESSION['shoppingReturnUrl'] = $_SERVER['REQUEST_URI']; // get the product information from database $sql = "SELECT pd_name, pd_description, pd_price, pd_image, pd_qty FROM tbl_product WHERE pd_id = $pdId"; $result = dbQuery($sql); $row = dbFetchAssoc($result); extract($row); $row['pd_description'] = nl2br($row['pd_description']); if ($row['pd_image']) { $row['pd_image'] = WEB_ROOT . 'images/product/' . $row['pd_image']; } else { $row['pd_image'] = WEB_ROOT . 'images/no-image-large.png'; } $row['cart_url'] = "cart.php?action=add&p=$pdId"; return $row; } ?> any help will be greatly appreciated This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=343748.0 Hello - I have a search page that displays urls to a details page. Currently, the url looks like this: ".com/loc_details.php?loc_id=38" but I would like it to have the contents of the 'loc_name' field display after the id. Here is how it's being called in the code: Code: [Select] $output .= "<td><a href='loc_details.php?loc_id={$row['loc_id']}'>{$row['loc_name']}</a></td>\n"; The only thing I can think of to compare it to would be the pretty links that Wordpress offers. The website for reference is www.giantstridedives.com/locations, so you can see it in action. Thanks for any help! Im trying to figure out, for my website, how to determine that page that a visitor is on so I can set the page title. I created an array (thinking that is what would be needed, not sure) Code: [Select] $pagetitle[0] = "Home"; $pagetitle[1] = "Links"; and so on for the different pages. My hope was to use an echo statement to create a title with a page name Code: [Select] <?php echo "$sitename - $pagetitle"; ?> Where my severe inexperience is getting me is how to code the php so that it knows what page it is on and then go through the array to get the appropriate page name. I may be doing this completely wrong from the start as far as method is concerned, so Im open to any ideas. Hello, I'm new here and need some help. I'm a beginner with PHP Here's what I have.... The index page looks like this: <? include("header.php"); ?> <? include("sidebar.php"); ?> <? include("main.php"); ?> <? include("footer.php"); ?> On all of the pages for the site, the only thing that will change will be: <? include("main.php"); ?> When viewing the home page, the title in the browser shows: Home Page (which is what I want). However, when clicking on links in the nav bar, I want the title to reflect those page names. For example, the code above displays the home page, but then if you click on (for example) "Bio's" in the navigation bar, it will take you to the Bio's page, obviously. the link for that menu item is: bio.php. The bio.php page looks like this: <? include("header.php"); ?> <? include("sidebar.php"); ?> <div> All the data and formatting for this page </div> <? include("footer.php"); ?> ............. I would like to put some php code in the header that will automatically detect the title of each page, how can I do this? Should I put <? title=Bio's Page ?> (or whatever page) at the top of each page, then call to it somehow from the header? Any help would be appreciated. |