[Solved] Redirect to another URL in PHP [closed]


Once you have submitted your form, you will neded to detect the form submission and redirect using header() before any HTML output. Place this at the top of your page (presuming that you are in a php file) before your opening <html>:

<?php
if ((isset($_GET['site'])) && ($_GET['site'] != '')){

    header("Location: ".$_GET['site']);
    exit;
}
?>

1

solved Redirect to another URL in PHP [closed]