Question : php best way to redirect

Hi,

I was wondering what the best way is to redirect a user after they have submitted a form. currently after submitting the form a user would have to sit at a blank php page.

I need it to redirect after some operations are performed.

whats the best way?

thanks.

Answer : php best way to redirect

typically using the header() function is quick and easy.
<?php
if ($_POST) {
  [the code you have for handling the submit]
  ....
  ....
  //Ok done, lets move them on.
  header(Location: "http://somewhere_else_but_here");
}
?>
<html>
<body>
page content
</body>
</html>

This would be placed at the top of the page after all your post work is done.
Random Solutions  
 
programming4us programming4us