Connecting Tech Pros Worldwide Help | Site Map

problems getting valid HTML out of PHP

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 08:39 AM
lawrence
Guest
 
Posts: n/a
Default problems getting valid HTML out of PHP

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?

  #2  
Old July 17th, 2005, 08:39 AM
Steve Pugh
Guest
 
Posts: n/a
Default 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

  #3  
Old July 17th, 2005, 08:39 AM
Christopher-Robin
Guest
 
Posts: n/a
Default 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


  #4  
Old July 17th, 2005, 08:39 AM
Dave Patton
Guest
 
Posts: n/a
Default 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/
  #5  
Old July 17th, 2005, 08:39 AM
David Quinton
Guest
 
Posts: n/a
Default 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>
  #6  
Old July 17th, 2005, 08:40 AM
jmm-list-gn
Guest
 
Posts: n/a
Default 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)
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.