473,569 Members | 2,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weird query results / <title> issues

Hey everyone.

I'm editing some stuff I did last summer, trying to bugfix and improve
stuff. One improvement (or an oversight of the original design) is
adding dynamic <title> tags to my pages. Here's how I originally
structured my php pages:

include header.php (contents are basically my HTML/CSS up to the
<!--begin content--> point)
<php code>
include footer.php (contents are from <!--end content--> onwards).

Obviously this meant I had the same <title> as defined in header.php
for every page, not cool. I went through and revised the structure to
this:

include doctype.php (HTML from the opening document declaration down to
just before <title>)
Then began my query(s), and once the results were grabbed:
echo "<title>$bandNa me - recordName review</title";
include header.php (this file now contains everything below <title>
down to <!--begin content-->)
<php code to output content>
include footer.php (as above)

This worked great for almost all of my pages but one. Here's the link:

http://www.threechords.org/spb/reviews/678

This might look normal to you, but try clicking some of the other
reviews in the left panel. The cover image and headings stay the same,
and the author information at the bottom again stays the same, which is
of course incorrect. I'm not sure where I'm going wrong with my code,
so I'll post up what I'm doing:

http://www.threechords.org/spb/revie...layreview.phps

That file has doctype.php, header.php and footer.php physically
included so you can see their contents too (ordinarily they're included
with php includes).

Any advice as to why I can't get this to work/ how terrible my code
structuring is would be really helpful.

Matt

Feb 18 '06 #1
13 1627
Anyone?

Feb 23 '06 #2
This might look normal to you, but try clicking some of the other
reviews in the left panel. The cover image and headings stay the same,
and the author information at the bottom again stays the same, which is
of course incorrect. I'm not sure where I'm going wrong with my code,
so I'll post up what I'm doing:

http://www.threechords.org/spb/revie...layreview.phps


I see this:

mysql_query($q2 ) or die;

but before that line I don't see any connection code. Maybe there
should be some connection code?

---
Steve

Feb 23 '06 #3
Ah, I removed my included config.php and opendb.php just for security
purposes so my password/hostname etc weren't posted up here, should
have specified.

Feb 23 '06 #4
gu************@ gmail.com wrote:
Hey everyone.

I'm editing some stuff I did last summer, trying to bugfix and improve
stuff. One improvement (or an oversight of the original design) is
adding dynamic <title> tags to my pages. Here's how I originally
structured my php pages:

include header.php (contents are basically my HTML/CSS up to the
<!--begin content--> point)
<php code>
include footer.php (contents are from <!--end content--> onwards).

Obviously this meant I had the same <title> as defined in header.php
for every page, not cool. I went through and revised the structure to
this:

include doctype.php (HTML from the opening document declaration down to
just before <title>)
Then began my query(s), and once the results were grabbed:
echo "<title>$bandNa me - recordName review</title";
include header.php (this file now contains everything below <title>
down to <!--begin content-->)
<php code to output content>
include footer.php (as above)

This worked great for almost all of my pages but one. Here's the link:

http://www.threechords.org/spb/reviews/678

This might look normal to you, but try clicking some of the other
reviews in the left panel. The cover image and headings stay the same,
and the author information at the bottom again stays the same, which is
of course incorrect. I'm not sure where I'm going wrong with my code,
so I'll post up what I'm doing:

http://www.threechords.org/spb/revie...layreview.phps

That file has doctype.php, header.php and footer.php physically
included so you can see their contents too (ordinarily they're included
with php includes).

Any advice as to why I can't get this to work/ how terrible my code
structuring is would be really helpful.

Matt


Did you dump your database and check it? What's actually in the
'Cover_Image' column for the row with id 679, for instance?

It might help as a debugging aid to echo the results returned by your query.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Feb 23 '06 #5
Yeah, I know for a fact that row #679 is definitely not holding all of
the data being displayed there. SOME of it is, just not certain fields,
they stay the same no matter what the ID.

Feb 24 '06 #6
gu************@ gmail.com wrote:
Yeah, I know for a fact that row #679 is definitely not holding all of
the data being displayed there. SOME of it is, just not certain fields,
they stay the same no matter what the ID.


Again, what is there?

Also, please quote what you're replying to. Not everyone has access to
previous messages.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Feb 24 '06 #7
Jerry Stuckle wrote:
Again, what is there?

Also, please quote what you're replying to. Not everyone has access to
previous messages.


Apologies for that.

Well, we can compare the dev site with the live one:

Live: http://www.scenepointblank.com/reviews/679

Dev: http://www.threechords.org/spb/reviews/679

Try changing the numbers in the URLs: the image, band name, record and
review name are all messed up. Both sites use the same database (the
dev site is a duplicate of the live one).

Feb 24 '06 #8
This might look normal to you, but try clicking some of the other
reviews in the left panel. The cover image and headings stay the same,
and the author information at the bottom again stays the same, which is
of course incorrect. I'm not sure where I'm going wrong with my code,
so I'll post up what I'm doing: http://www.threechords.org/spb/revie...layreview.phps That file has doctype.php, header.php and footer.php physically
included so you can see their contents too (ordinarily they're included
with php includes).


It occurs to me that you must be using Apache's modrewrite to map fancy
URLs to your script displayreview.p hp?id=xyz - is it set up identically
for live and dev?

---
Steve

Feb 24 '06 #9

Steve wrote:
It occurs to me that you must be using Apache's modrewrite to map fancy
URLs to your script displayreview.p hp?id=xyz - is it set up identically
for live and dev?


Yeah - the dev site is an exact replica of the live one, only with URLs
changed etc for functionality. You can use URLs of that form you
specified with this system, I've tried both and it makes no difference.

Feb 24 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4136
by: Info 3000 | last post by:
Hi there, Simple question, but headache ! I have a PHP Page like : <HTML> <HEAD> <TITLE>Sunny day !</TITLE> </HEAD>
3
10097
by: D. Alvarado | last post by:
Hello, I am trying to find the <TITLE> element of my document. Normally alert(document.title); works just fine, but when this statement is within a page that is a frame in a larger document, the above call always returns the title of the parent (container) page. Is it possible through JS to deduce the <TITLE> element of the current...
1
1396
by: Andreas Klemt | last post by:
Hello, I have in my strHtml a html page. so what is the fastest way (with XML Read?) to get the "myValue" between <title>myValue</title> Thanks, Andreas
6
1931
by: Alex | last post by:
Hi, is it possible to set the title programatically from the code behind page. I placed a literal in the head section of the form and set its text property. it seemed to work bu the literal is not in the <form> section of the page. does this matter or is there a better way to programatically/dynamically set the title of the page.
8
3958
by: DC | last post by:
In HTML page, I put: <html> <head> <title>Article: <asp:Label ID="lblHTMLTitle"></asp:Label> </title> .... In the code behind: ....
7
1582
by: Brad | last post by:
I'm placing a runat=server attribute on the <title> tag in my pages, so I can read/set the title text in code. The problem is that when I subsequently change the page in design view VS is removing the runat=server from the <title> tag. Unfortunately it does not do it all the time...maybe 50%. Brad
1
1851
by: Alan Silver | last post by:
Hello, I am just experimenting with master pages, and am trying to add a content placeholder in the <head> section, so that individual pages can set their own page title and meta tags. The master page looks like this... <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
4
3812
by: David Thielen | last post by:
Hi; If I am using master pages, how do I set the <title> and <meta name='description' content='my title'> for each page. Obviously each page will have a different title & description. -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com
5
1243
by: dbuchanan | last post by:
How can a page title be supplied at runtime. It looks to me like it is hard coded, but there must be some way. <head runat="server"> <title>Training</title>
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.