Page 1 of 1
Title Pic Not Showing
Posted: Thu Aug 07, 2008 8:03 pm
by CoolAsCarlito
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>';
Re: Title Pic Not Showing
Posted: Thu Aug 07, 2008 8:15 pm
by Dynamis
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
Re: Title Pic Not Showing
Posted: Thu Aug 07, 2008 8:24 pm
by CoolAsCarlito
Why do I need that?
Re: Title Pic Not Showing
Posted: Thu Aug 07, 2008 9:58 pm
by Dynamis
CoolAsCarlito wrote:Why do I need that?
In a url, you seperate the GET variables by & so:
example.php?var1=result1&var2=result2&var3=result3
Just how it is
Re: Title Pic Not Showing
Posted: Fri Aug 08, 2008 6:11 am
by pkbruker
Actually, to be absolutely correct, your code should:
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
Posted: Fri Aug 08, 2008 7:34 am
by Dynamis
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
Posted: Fri Aug 08, 2008 7:53 am
by idevlin
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.
Using & rather than & is not XHTML compliant I believe.
Re: Title Pic Not Showing
Posted: Fri Aug 08, 2008 7:57 am
by ghurtado
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.
"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.
The escaped ampersand is likely to work in as many browsers, if not more, and is future proof.
Re: Title Pic Not Showing
Posted: Fri Aug 08, 2008 8:00 am
by Dynamis
Learn something new everyday. Thanks.