By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,825 Members | 1,462 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,825 IT Pros & Developers. It's quick & easy.

problems getting valid HTML out of PHP

P: n/a
not sure if this is a PHP or HTML question. PHP sessions usually put a
"?" after the url and then the session number. Most validators choke
on the "?". What should I use instead? And where is the damn line? All
I can find is this:
; The separator used in PHP generated URLs to separate arguments.
; Default is "&".
;arg_separator.output = "&"

; List of separator(s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!
;arg_separator.input = ";&"

This is, I think, where I set it to use "&" instead of "&". But
how do I get rid of the question mark? How do people, in general, get
valid HTML when using PHP?
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On 17 Sep 2004 17:26:41 -0700, lk******@geocities.com (lawrence)
wrote:
not sure if this is a PHP or HTML question. PHP sessions usually put a
"?" after the url and then the session number. Most validators choke
on the "?". What should I use instead?


A ? in a url in html doesn't normally prevent it being valid. Do you
have an actual page that fails to validate because of this? Are you
sure that you're reading the error message correctly?

Steve

Jul 17 '05 #2

P: n/a
this is often because of a wrong <!doctype ...> at the beginning of the html

thats all i know, i never got into it, although its bothering me, as well
Jul 17 '05 #3

P: n/a
lk******@geocities.com (lawrence) wrote in
news:da**************************@posting.google.c om:
not sure if this is a PHP or HTML question.
It's a PHP question, most likely.
PHP sessions usually put a "?" after the url
and then the session number.
No, that is one of the possible behaviours, but
it "doesn't just happen".
Most validators choke on the "?".
Which validators?
Provide a URL of an example page.
What should I use instead? And where is the damn line? All
I can find is this:

; The separator used in PHP generated URLs to separate arguments.
The question mark is the standard delimiter that marks the
start of query string arguments in a URI. Nothing to do with
argument separators.
But how do I get rid of the question mark?


You don't, if you want to use query string arguments.

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 17 '05 #4

P: n/a
On 17 Sep 2004 17:26:41 -0700, lk******@geocities.com (lawrence)
wrote:
not sure if this is a PHP or HTML question. PHP sessions usually put a
"?" after the url and then the session number. Most validators choke
on the "?". What should I use instead? And where is the damn line? All
I can find is this:
I think you'll find it's choking on the "&" and not the "?".

[snip]This is, I think, where I set it to use "&amp;" instead of "&".


So do I.
Edit your php.ini accordingly or add line:
php_value arg_separator.output "&amp;"
to .htaccess
--
FREE phonecalls with other TalkTalk customers: <http://www.bizorg.co.uk/shopping/talktalk/>
Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>
Jul 17 '05 #5

P: n/a
lawrence wrote:
not sure if this is a PHP or HTML question. PHP sessions usually put a
"?" after the url and then the session number. Most validators choke
on the "?".

If you are uploading a php file, yes, you get errors. If by URL, there
should be no such problem.
So: what validator are you using and how are you sending the markup?
And do you have a sample URL?

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.