I've done that on occasion, but do be careful what you are sending via
the GET.

It has a size limit for one (maybe 1k chars?) and it is trivial for
someone to modify.

I generally use GET when I think it's a page "setup" the user may wish
to bookmark (ie: page.php?orderby=name&descending=1&report=69 )

And POST for submitting data that I want to save. (ie: add a new user
and all their glory).

I have done a mixture, such as page.php?action=delete&id=5 

But you have to be careful. I guess I always have some kind of user
class and verify they have permissions to use the page and or delete
said record anyways (logging failed attempts of course).

> -----Original Message-----
> From: Ray [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 08, 2007 8:19 PM
> To: php-general@lists.php.net
> Subject: [PHP] get and post together
> 
> Hi all,
> I've done something and I want to know if I should be ashamed :)
> 
> I've set up a form with method="POST" and target ="page.php?foo=bar"
> it works fine. $_POST[...] gives me the data I want and 
> $_GET['foo']=='bar'.
> I freely admit it's an ugly kludge, but is it "bad"?
> Ray
> 
> -- 
> 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

Reply via email to