up vote 1 down vote favorite
share [g+] share [fb]

Do you see a problem with using the following convention for "views" (as in MVC).

webpage.php?past
script.php?all
page.php?about

For the PHP itself, I check for those values as such:

if(isset($_GET['past'])){
   ...
} else {
    ...
}

This works fine on all major browsers, so far.

link|improve this question

74% accept rate
1  
Wrong how? It's perfectly acceptable as far as URLs go. – Marc B Jan 4 at 18:48
Weird question. No it's not a problem. – Jules Jan 4 at 18:51
@Jules - Weird answer. Thanks! ;) – AVProgrammer Jan 4 at 19:03
feedback

1 Answer

up vote 0 down vote accepted

That syntax is quite valid in terms of URL spec: http://tools.ietf.org/html/rfc3986#section-3.4

Just ensure that any special characters are encoded as you'd have to do in any URL anyway

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.