title: php executes first with form action="<?php echo $_SERVER['PHP_SELF']; ?>
body: <p>php executes first with form action="
  it doesn't wait 'form action=' from html...
  what's wrong? </p>
  
  <pre><code>&lt;?php
  if(isset($_POST['submit']))
  {
      $name = $_POST['name'];
      echo "User Has submitted the form and entered this name : &lt;b&gt; $name &lt;/b&gt;";
      echo "&lt;br&gt;You can use the following form again to enter a new name.";
  }
  ?&gt;
  </code></pre>
  
  <p>from my .htaccess. maybe it's braking the code</p>
  
  <pre><code>## Turn on and setup apache rewrite ##
  RewriteEngine On
  Options +Followsymlinks
  RewriteBase /
  
  ## Dissable directory indexing ##
  Options -Indexes
  
  ## Remove trailing slash from end of uri ##
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteCond %{REQUEST_URI} !/$
  RewriteRule (.*) $1\.php [L]
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.+)/$ /$1 [R=301,L]
  
  # Redirect to non.php extension
  RewriteCond %{THE_REQUEST} ^GET\ /([^/]+/)*[^.]+\.php(\?[^\ ]*)?\ HTTP/
  RewriteRule ^(([^/]+/)*[^.]+)\.php$  $1 [R=301,L]
  
  ## Rewrite Rules ##
  RewriteRule ^([0-9-a-z-A-Z-_]+)/?$ goto.php?id=$1 [L]
  RewriteRule ^account/(.*)$  $1.php [L]
  </code></pre>