Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation issues with SESSION variables

Status
Not open for further replies.

CliffLandin

Programmer
Nov 14, 2004
81
US
I am almost finished with a site that uses $_SESSION variables which works just fine. However, when I try to validate the page via the W3C validation site ( I get a slew of errors stemming from the sessionID being passed with every link.

I guess that it would be easier to explain if you go to

Thanks for any help that you can offer.

When in doubt, go flat out!

 
are you passing the Session ID into the url?

check your phpinfo() to see if session.use_cookies is set to 1. Changing this setting might help if you're not actually putting in your code.

on another note, to validate your <ul type='none'>, try removing the bullet via css. That should validate fine.
 
Seems the validator may want you to treat your "&"'s in
urls as "&amp;", check this out:

To avoid problems with both validators and browsers, always use &amp; in place of & when writing URLs in HTML:

<a href="foo.cgi?chapter=1&amp;section=2">...</a>

Note that replacing & with &amp; is only done when writing the URL in HTML, where "&" is a special character (along with "<" and ">"). When writing the same URL in a plain text email message or in the location bar of your browser, you would use "&" and not "&amp;". With HTML, the browser translates "&amp;" to "&" so the Web server would only see "&" and not "&amp;" in the query string of the request.


Thanks,
 
Yes, um no, I am not passing the sessID in the url, well I am, but it is not coming from my coding. Therefore I can't change the & to &amp;. I will check phpinfo().

Thanks for the input.

When in doubt, go flat out!

 
Ok, after doing a bit of checking I have found that session.use_cookies is set to ON which equates to 1. So, could it be with the coding? The links that are flagged in the validation are straight html anchors, for example:

<a href=" name="DayTrips" type="text/html">Day Trips</a>

It doesn't appear in the url or if you view source. I only get it when I try to validate.

When in doubt, go flat out!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top