473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Ampersands in urls

My website uses sessions and therefore sends PHPSessionID's throug the url
whenever a browser does not accept cookies. This works well except tha when
i try to validate the webpage with W3C it complains about my url's having &
which I should change in &. How can I tel my webserver to do that?
url: http://www.kunstenschool.nl
--
wiert

Jul 24 '05 #1
2 1532
Wiert Dijkkamp wrote:
My website uses sessions and therefore sends PHPSessionID's throug the url
whenever a browser does not accept cookies. This works well except tha
when i try to validate the webpage with W3C it complains about my url's
having & which I should change in &. How can I tel my webserver to do
that? url: http://www.kunstenschool.nl


http://www.w3.org/QA/2005/04/php-session

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #2
David Dorward wrote:
Wiert Dijkkamp wrote:
My website uses sessions and therefore sends PHPSessionID's throug the
url whenever a browser does not accept cookies. This works well except
tha when i try to validate the webpage with W3C it complains about my
url's having & which I should change in &amp;. How can I tel my webserver
to do that? url: http://www.kunstenschool.nl


http://www.w3.org/QA/2005/04/php-session

thanks a lot. I put "ini_set('arg_separator.output','&amp;');" in my
fix_code function like this an now it works.

<?php
$charset = "iso-8859-1";
$mime = "text/html";

function fix_code($buffer) {
ini_set('arg_separator.output','&amp;');
$in = array(" />"," px;");
$out= array(">","px;");
return (str_replace($in, $out, $buffer));
}
ob_start("fix_code");
$prolog_type = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01
Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>

<html lang='nl'>";

header("Content-Type: $mime;charset=$charset");
print $prolog_type;
?>
--
wiert
Jul 24 '05 #3

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

Similar topics

1
by: leegold2 | last post by:
The subject title is a sedgeway into my question that may slightly of topic but I've asked many sources and don't have an answer yet so I ask it here. I have a text fields of html marked up...
2
by: micha | last post by:
my php script gets delivered text that contains special chars (like german umlauts), and these chars may, may partially or may not be coverted into html entities already. i don't know beforhand. ...
5
by: kaeli | last post by:
Hey all, In trying to get my site to validate (html 4.01 transitional), I ran across an issue with this type of url in an href: http://www.server.com/somePage?param1=1&param2=2 etc Notably:...
7
by: Gene Kelley | last post by:
I'm having some trouble echoing string data that contains an ampersand in it. I am filling a WHERE clause in my SQL query with a string based upon a choice made in a select/option form element...
11
by: Steven D'Aprano | last post by:
I'm using urllib.urlretrieve() to download HTML pages, and I've hit a snag with URLs containing ampersands: http://www.example.com/parrot.php?x=1&y=2 Somewhere in the process, urls like the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.