[Solved] Redirect to URL with variable inside php


<?php

        if(isset($_POST['action']) && $_POST['action']!="")
        {
            if(isset($_POST['username']) && $_POST['username']!="")
            {
             header('Location: some_other_page.php?username=".$_POST["username']);
             exit;
            }
        }

    ?>

    <form action='index.php' method='post'>
        <input name="username" type="text" value="" placeholder="Insert username here">
        <input type="submit" value="Go" name="Go">
        <input type="hidden" name="action" value="do_redirect">
    </form>

1

solved Redirect to URL with variable inside php