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

Asked

Viewed 339 times

-1

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

1 answer

2

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

<?php

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

?>

I hope I helped, I could not understand the problem clearly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.