title: Form - Redirect after hitting Submit
body: <p>I am looking to get my form to redirect after the submit button is pressed.. but I am not sure what I am doing in correctly.</p>
  
  <pre><code>&lt;?php
  
  
  $user_id = example;
  $game_id = 'example';
  $value = $_POST['value'];
  $date = date(mdyHis);
  $secret = "example";
  $username = $_POST['username'];
  $hash = md5($user_id.$username.$game_id.$value.$date.$secret);
  $redeem_link="http://www.example.com/".$user_id."&amp;userNAME=".$username."&amp;gameID=".$game_id."&amp;value=".$value."&amp;dateTime=".$date."&amp;key1=".$hash;
  
  if($_POST['submit']){
      header( 'Location: ".$redeem_link."' ) ;
  } 
  
  ?&gt;
  </code></pre>
  
  <p>And here is my form code.</p>
  
  <pre><code>&lt;form action='?' method='post'&gt; 
  &lt;td&gt;
  &lt;center&gt;
  &lt;div class="form-group"&gt;
  &lt;input type="text" class="form-control" id="username" name="username" placeholder="Enter Username"&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;input type="text" class="form-control" id="password" name="value" placeholder="Enter Amount"&gt;
  &lt;/div&gt;
  &lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&lt;center&gt;&lt;button class="btn btn-lg btn-primary" action="" type='submit' name='submit' value='Submit'&gt;Submit&lt;/button&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/form&gt;
  </code></pre>