What PHP function to open a page if the condition is true? [closed]

-1

I want the person to search the form, if the search is true that opens an existing page related to the search, what function can I use for this?

    
asked by anonymous 06.10.2017 / 04:59

1 answer

2

You set the value of the $ search variable according to the condition you want, and the header () function does the redirect.

<?php

if ($busca == true) {
  header("Location: pagina_busca.php");
}

?>

I hope I have helped, I did not understand the problem clearly.

    
06.10.2017 / 05:16