Title Pic Not Showing
Moderator: General Moderators
-
CoolAsCarlito
- Forum Contributor
- Posts: 192
- Joined: Sat May 31, 2008 3:27 pm
- Contact:
Title Pic Not Showing
Here's my code and why isn't it showing on my champions page located at http://www.kansasoutlawwrestling.com/champions.php
print '<tr><td valign=top width=200><a href=titlehistories.php?id=' . $row['id'] . ' title="View KOW '.$row['titlename'].' History"><img src=src="/images/' . $row['titleimage'] . '" width=200 height=200 border=0 alt="View KOW '.$row['titlename'].' History"></a></td>';
print '<tr><td valign=top width=200><a href=titlehistories.php?id=' . $row['id'] . ' title="View KOW '.$row['titlename'].' History"><img src=src="/images/' . $row['titleimage'] . '" width=200 height=200 border=0 alt="View KOW '.$row['titlename'].' History"></a></td>';
Re: Title Pic Not Showing
Something I see real quick is your url. You currently have titlehistories.php?id=Xtitle=X, you are missing &. Should be:
titlehistories.php?id=X&title=X
titlehistories.php?id=X&title=X
-
CoolAsCarlito
- Forum Contributor
- Posts: 192
- Joined: Sat May 31, 2008 3:27 pm
- Contact:
Re: Title Pic Not Showing
Why do I need that?
Re: Title Pic Not Showing
In a url, you seperate the GET variables by & so:CoolAsCarlito wrote:Why do I need that?
example.php?var1=result1&var2=result2&var3=result3
Just how it is
Re: Title Pic Not Showing
Actually, to be absolutely correct, your code should:
1. Use & and not & as sepparator
2. Appropriate use of "
Like this:
1. Use & and not & as sepparator
2. Appropriate use of "
Like this:
Code: Select all
print '<tr><td valign="top" width="200"><a href="titlehistories.php?id=' . $row['id'] . '&title='.urlencode('View KOW '.$row['titlename'].' History').'"><img src="/images/' . $row['titleimage'] . '" width="200" height="200" border="0" alt="View KOW '.$row['titlename'].' History"></a></td></tr>';
Re: Title Pic Not Showing
I would still just use & by itself as in my previous statement, it works on every system and is shorter. No need for the other stuff.
Re: Title Pic Not Showing
Using & rather than & is not XHTML compliant I believe.Dynamis wrote:I would still just use & by itself as in my previous statement, it works on every system and is shorter. No need for the other stuff.
Re: Title Pic Not Showing
"Other stuff"? Pkbruker simply replaced the ampersand with an escaped ampersand, since it is being used inside of HTML. Although most browsers today work without escaping it, that is not the correct way of doing it as per the W3C recommendation, and you are running the risk that future browsers "break" your webpage (which was already broken to begin with) if you choose not to escape them.Dynamis wrote:I would still just use & by itself as in my previous statement, it works on every system and is shorter. No need for the other stuff.
The escaped ampersand is likely to work in as many browsers, if not more, and is future proof.
Re: Title Pic Not Showing
Learn something new everyday. Thanks.