Forum Moderators: open

Message Too Old, No Replies

Html Links data adding ? strict

         

MrWhippy

2:01 pm on Aug 27, 2008 (gmt 0)

10+ Year Member



Hi all,

I have just been browsing round the W3 site, and cant find the answer on this or on google.

I have a link that passes data through it via ? tag in the address bar, this does not validate in html strict, can anyone tell me how this is supposed to be done now, to make it validate.

birdbrain

2:36 pm on Aug 27, 2008 (gmt 0)



Hi there MrWhippy,

without seeing the actual link, I will have to make a guess. ;)
I expect that your link contains a & or two.
These need to be changed to &.

birdbrain

MrWhippy

3:05 pm on Aug 27, 2008 (gmt 0)

10+ Year Member



Hi there birdbrain,

Thanks for the answer, unfortunately the link does not contain any &

here is a copy of the link


<a href=blog.php?add=yes>blog</a>

it appears to be the ? that is causing the problem however the page contents are loaded depending on what is stored in the add variable.

just realised i probably need to swap the ? for the ascii code for it, ill give that a try, thank birdbrain

[edited by: MrWhippy at 3:06 pm (utc) on Aug. 27, 2008]

Receptional Andy

3:06 pm on Aug 27, 2008 (gmt 0)



You need quotes around the link destination if it contains any special characters:

<a href="blog.php?add=yes">blog</a> 

MrWhippy

3:22 pm on Aug 27, 2008 (gmt 0)

10+ Year Member



Thanks Andy,

Got it, been bugging me for a while that one.