title: php want to redirect after to other page after mysql insert
body: <p>This is my php</p>
  
  <pre><code>&lt;?php
  $name = $_POST['name'];
  $pass = $_POST['pass'];
  
  
  mysql_connect ("localhost", "root", "pass1") or die ('error: ' . mysql_error());
  mysql_select_db("test2");
  
  $sql = "INSERT INTO test2 values (NULL, '$name', 
  '$pass');";
  
  mysql_query($sql) or die ('error: ' . mysql_error());
  
  if $post('index2.php');
  ?&gt;
  </code></pre>
  
  <p>here i just want to redirect to other page after i submit my form, my form is just sample</p>
  
  <p>with row input by the name of name and pass that's all</p>
  
  <p>Regards in advance</p>