title: Redirect to another page php if and else statement
body: <p>Hey i want to redirect to the same page on my if and else statement. How would i do it?</p>
  
  <p>I tried the following code but didnt work:</p>
  
  <pre><code>if($ac == 'yes'){
      $message="Demo sold their product";
      header( "Location: delete/delete.product.php?product=&lt;?php echo $encodeCodeProduct; ?&gt;" ); die;
  } else{
      $message="Demo did not sell their product";
      header( "Location: delete/delete.product.php?product=&lt;?php echo $encodeCodeProduct; ?&gt;" ); die;
  }
  </code></pre>