Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8990409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:29:40+00:00 2026-06-15T22:29:40+00:00

The script below echos the array and its individual elements fine but when the

  • 0

The script below echos the array and its individual elements fine but when the array elements are used to set the page title by running the script after the opening head tag, I still get “untitled document” as the page title.

Further if I try echoing $title alone and placing the title tags <> before and after the php tags, the title is set as the document type definition..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

It seems that echo sets the relevant HTML tags required before if not already set. Whats the work around ??

<?php
include 'contentStream.php' ;
$upc = $_GET['upc'];
if (isset($upc))
{
global $upc ;
$query = "SELECT * FROM tracks WHERE album_upc='$upc'";
connect();
$db = mysql_select_db("XXXXX");
$results = mysql_query($query, $connection) ;
$result = mysql_fetch_assoc($results);
$title = $result['title']." by ".$result['author'] ;
echo "<title>".$title."</title>";
unset($results);
unset($query);
mysql_close($connection) ;
}
else
{
    echo "<title> MYsUPERsITe </title> " ;
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:29:41+00:00Added an answer on June 15, 2026 at 10:29 pm

    Is this being executed within the <head> element? If not it needs to be.

    I am not sure what contentstream.php is but it looks like you might be running this at the wrong location in the page.

    Also try changing $title to $myTitle to see if $title has been set somewhere else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The script below works fine if 3 and 3.2 are not links but i
I have to following problem, after running script below it prints out an extra
Below is my example script: <li><a <?php if ($_GET['page']=='photos' && $_GET['view']!==projects||!==forsale) { echo (href=\#\
The script below should open all the files inside the folder 'pruebaba' recursively but
My script below will use two external tables to fill two separate tables, but
I tested out the script below in jsfiddle and it works fine, can someone
i record number of queries of my website and in page the below script
I finally managed to get the PHP script below to work...but then I found
The script below, test.php, is intended to be placed in a specific directory of
The script below resides in my theme's functions.php file. It is designed to show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.