I used to be able to check if the form is submitted by doing this:

if ($_POST['value']) {
   echo 'form posted';
}

But I noticed that it does not work onall servers that way. What is the bullet-profs method?

I also tried the following: if ($POST['value'] != '') and if (isset($POST['value']))

those seem to work...

Like i said, what's the best way of doing it????

     if (isset($_POST['value'] {}  if (!isset($_POST['value']) {}

      I use

      if (!empty($_POST))
      

      to check for a $_POST array

        if (empty($_POST['value']))
        
        or
        
        if (!empty($_POST['value']))

        Then you can check that it really have a value. With isset it only checks that it exists, and it can exist with a value of "", in other words an empty string.

          Write a Reply...