Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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.

share|improve this question
1  
Wrong how? It's perfectly acceptable as far as URLs go. –  Marc B Jan 4 '12 at 18:48
    
Weird question. No it's not a problem. –  Jules Jan 4 '12 at 18:51
    
@Jules - Weird answer. Thanks! ;) –  AVProgrammer Jan 4 '12 at 19:03
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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