Free2Code
The majority of forums are now only available as archives, which means posting/editing is disabled.

The Anything and Everything forum is still open.
 
Time: 2013-05-21, 10:17pm
Loss of <title> information
Subject: Loss of <title> information  ·  Posted: 2006-06-06, 10:27pm
Rank: ? (6)
Member #: 27729
Following on from my previous topic, whenever I have php code above the opening <html> tag, the title text no longer shows on the web page. It is typed in, but when I load my page I get Untitled Document.

I think this may be something to do with the php headers. Is there a way to add a page title with php?

 
  Reply to this ·  Post link ·  Top
Subject: Re: Loss of <title> information  ·  Posted: 2006-06-07, 02:08am
Rank: ? (4827)
Member #: 3416
it shouldn't make a difference unless your php code has some sort of output that's messing up the html. can you either post your code or a link to a page that has the problem?

my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
 
  Reply to this ·  Post link ·  Top
Subject: Re: Loss of <title> information  ·  Posted: 2006-06-07, 02:43pm
Rank: ? (6)
Member #: 27729
Code:
  1. <?php
  2. // database connect script.
  3. require 'db_connect.php';
  4. //if($logged_in == 1) {
  5.     //die('You are already logged in, '.$_SESSION['pid'].'.');
  6. //}
  7. ?>
  8. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  9. <html xmlns="http://www.w3.org/1999/xhtml">
  10. <!-- DW6 -->
  11. <head>
  12. <!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
  13. <title>Southern Cross Airlines</title>
  14. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  15. <link rel="stylesheet" href="images/mm_entertainment.css" type="text/css" />
  16. <style type="text/css">
  17. <!--
  18. .style2 {color: #99CCFF}
  19. -->
  20. </style>
  21. </head>
  22. <body bgcolor="#14285f">


The "Southern Cross Airlines" text does not show, my other pages with the same problem use the same script above the <html> tag.

 
  Reply to this ·  Post link ·  Top
Subject: Re: Loss of <title> information  ·  Posted: 2006-06-07, 02:50pm
Rank: ? (900)
Member #: 3
If you're using the same db_connect script as indicated in your previous thread:

http://www.free2code.net/plugins/forums/view.php?f=4&p=48638&os=0#48649

then the HTML in that is your problem. You only need that PHP code to connect to the database in your db_connect script; scrap the rest.

» Post edited 2006-06-07, 02:53pm by bs0d.

--bs0d | allsyntax.com
 
  Reply to this ·  Post link ·  Top
Subject: Re: Loss of <title> information  ·  Posted: 2006-06-07, 05:30pm
Rank: ? (6)
Member #: 27729
It's always the simple things

 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

Penguino AVR

Want to learn about robotics or microcontrollers?
Check out the Penguino AVR from our friends at
Icy Labs