Connecting Tech Pros Worldwide Forums | Help | Site Map

problems getting valid HTML out of PHP

lawrence
Guest
 
Posts: n/a
#1: Jul 17 '05
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?

Steve Pugh
Guest
 
Posts: n/a
#2: Jul 17 '05

re: problems getting valid HTML out of PHP


On 17 Sep 2004 17:26:41 -0700, lkrubner@geocities.com (lawrence)
wrote:
[color=blue]
>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?[/color]

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

Christopher-Robin
Guest
 
Posts: n/a
#3: Jul 17 '05

re: problems getting valid HTML out of PHP


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


Dave Patton
Guest
 
Posts: n/a
#4: Jul 17 '05

re: problems getting valid HTML out of PHP


lkrubner@geocities.com (lawrence) wrote in
news:da7e68e8.0409171626.21da4d4f@posting.google.c om:
[color=blue]
> not sure if this is a PHP or HTML question.[/color]

It's a PHP question, most likely.
[color=blue]
> PHP sessions usually put a "?" after the url
> and then the session number.[/color]

No, that is one of the possible behaviours, but
it "doesn't just happen".
[color=blue]
> Most validators choke on the "?".[/color]

Which validators?
Provide a URL of an example page.
[color=blue]
> 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.[/color]

The question mark is the standard delimiter that marks the
start of query string arguments in a URI. Nothing to do with
argument separators.
[color=blue]
> But how do I get rid of the question mark?[/color]

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/
David Quinton
Guest
 
Posts: n/a
#5: Jul 17 '05

re: problems getting valid HTML out of PHP


On 17 Sep 2004 17:26:41 -0700, lkrubner@geocities.com (lawrence)
wrote:
[color=blue]
>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:[/color]

I think you'll find it's choking on the "&" and not the "?".

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

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>
jmm-list-gn
Guest
 
Posts: n/a
#6: Jul 17 '05

re: problems getting valid HTML out of PHP


lawrence wrote:[color=blue]
> 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 "?".
>[/color]
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)
Closed Thread