Jump to content

[SOLVED] Form wont post in IE


illegaljose

Recommended Posts

    <form name="form1" method="post"


<?

if(isset($_POST['Submit'])){
   $variable1 = $_POST['variable1'];
   $variable2 = $_POST['variable2'];

   $err = '';
   
   if(trim($variable1)==''){
      $err .= '<br>';
   }
   if(empty($variable2)){
      $err .= '';
   }
   else{
      $filename = 'data.txt';


      $somecontent = $variable1 . '	' . $variable2 . "\r\n";


      if (is_writable($filename)) {
         if (!$handle = fopen($filename, 'a')) {
             echo "Cannot open file ($filename)";
             exit;
         }
      
         // Write $somecontent to our opened file.
         if (fwrite($handle, $somecontent) === FALSE) {
            echo "Cannot write to file ($filename)";
            exit;
         }

         echo "THANKS!";
         
         fclose($handle);
      
      } else {
         echo "The file $filename is not writable";
      }
   }
}

?>

    <input type=hidden name="variable1" type="text" id="variable1" value="variable1">
    <input type=hidden name="variable2" type="text" id="variable2" value="variable2">
    <input type="image" src="submit.png" name="Submit" value="Submit" width="74" height="19">
    </form>

Link to comment
https://forums.phpfreaks.com/topic/165584-solved-form-wont-post-in-ie/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.