title: php_self and redirect in same page
body: <p>Is it ok or standard to use <code>$_SERVER['PHP_SELF'];</code> and <code>header('Location: http://www.example.com/form.php');</code> in the same page to avoid resubmitting the form on refresh.</p>
  
  <p>I understand the concept of using <code>$_SERVER['PHP_SELF'];</code> on a page with a form, but then if I use <code>header('Location: http://www.example.com/form.php');</code> to avoid resubmitting to the db should I be redirecting to the same page.</p>
  
  <p>I'm kinda confused.</p>
  
  <p><strong>UPDATE:</strong> Making it a bit more clear</p>
  
  <p>I don't want to use the processing file name in form action (future proof - filename change, etc.), hence the use of <code>$_SERVER['PHP_SELF']</code> but now hitting refresh resubmits the form. To avoid that we go the PRG route, but redirecting it to the same page <code>$_SERVER['PHP_SELF']</code> is not solving the issue.</p>
  
  <p>I wonder how others are doing it. Bottom line, I want to have my form and processing it in the same page without resubmission on refresh.</p>