Re: $_GET & $_POST simultaneously

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Browser history: I do not want it to contain any URIs to files which require 
some sort of id variable passed.

Example:
1. http://www.entity.org/edit.php 
(should produce an error or redirect to entity list)

2. http://www.entity.org/edit.php?id=1 
(should display editing interface)

Now I really do not like to use redirects in case of errors. So I could 
constantly use (2) second form of URI, even in POST requests.

But then, if I already have "id" in $_GET, why the redundancy of sending 
another "id" to $_POST?


B.

On Tuesday 11 January 2005 09:48, you wrote:
> Is it just me or ... why on earth would you want to populate both GET and
> POST arrays through this obscure way of coding ?
>
> If you really have a form where you dont have a clue wether your data comes
> from GET or POST, it should be way less effort to copy one array to another
> or have a lookup function to return the given value.
>
> / Lars
>
> ----- Original Message -----
> From: "Bostjan Skufca @ domenca.com" <bostjan.skufca@xxxxxxxxxxx>
> To: <php-general@xxxxxxxxxxxxx>
> Sent: Tuesday, January 11, 2005 5:42 PM
> Subject:  $_GET & $_POST simultaneously
>
> > Hello,
> >
> > If I create form like this
> > <form name="form" action="##_URI_ROOT##/entity/edit.php?a=b"
> > method="post">
> > <input type="hidden" name="action" value="modify" />
> > ...
> >
> > both arrays contain appropriate variables when submitted:
> > ::: $_GET :::
> >
> > Array
> > (
> >     [a] => b
> > )
> >
> > ::: $_POST :::
> >
> > Array
> > (
> >     [action] => modify
> > ...
> > )
> >
> > Now what I am interested in is if this is valid behaviour regarding HTTP
> > specification and if other platforms support this interference of GET and
> > POST variables in request?
> >
> > Thank your for your answers,
> > Bostjan
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux