0

What I'm trying to do is navigate to another page using a php script, so when I press the button it should change pages, but that's not what happens. Here is my code:

<script>
    function changeScreen() {
        <?php
            header('Location: index.php');
            exit();
        ?>
    }
</script>
3

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.