title: PHP, submit form and redirect using header and echo out a success message?
body: <p>I am trying to echo out a div with the message "form submitted successfully" on the next page once a user has submitted a form.</p>
  
  <p>i am trying to do this by using $_GET['success'] but can not seem to get the message to display, can someone please point me in the right direction.</p>
  
  <p>code:</p>
  
  <p>submit_form.php:</p>
  
  <pre><code>session_start();
  $_SESSION['success'] = "&lt;div class='success'&gt;Form Submitted Successfully&lt;/div&gt;;
  header("Location: index.php?success=$success");
  </code></pre>
  
  <p>index.php:</p>
  
  <pre><code>&lt;?php
  $_GET['success'] ?&gt;
  </code></pre>