| Posted by rf on 08/21/07 08:16 
"Fabio" <znt.fabio@virgilio.it> wrote in message news:46ca9d2d$0$17947$4fafbaef@reader1.news.tin.it...
 > "petersprc" <petersprc@gmail.com> ha scritto nel messaggio
 > news:1187682646.281398.67090@q3g2000prf.googlegroups.com...
 >
 >> if (isset($_POST['btn'])) {
 >>  echo 'Button post.';
 >> } elseif (isset($_GET['btn'])) {
 >>  echo 'Button get.';
 >> } else {
 >>  echo 'Page view.';
 >> }
 >
 > mmm... I'm doing something like
 >
 > if (count($_POST)> 0) {
 >    echo 'Button post.';
 > } elseif (count($_GET)> 0) {
 >    echo 'Button get.';
 > } else {
 >    echo 'Page view.';
 > }
 >
 > but if I visit
 >
 > http://www.mysite.com/?submitted=false
 >
 > I get "Button get." also if I didn't pressed nothing :(
 
 Because that is how get data is sent to the server. Sever side you simply
 can not tell. Why do you need to?
 
 --
 Richard.
  Navigation: [Reply to this message] |