how do I send data from one php file to another?
ouputI have a button on a file test.php


    <?php
    $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    ?>
    <input type="button" name="btn" value="Download" onclick="alert('<?php echo $url; ?>')">

when the file is clicked, it alerts the page's url.

I have another page, test2.php.

I want the url that is being alerted to be displayed out in test2.php

How can I accomplish this?
how do I send data from one php file to another?
===

ouputI have a button on a file test.php


    <?php
    $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    ?>
    <input type="button" name="btn" value="Download" onclick="alert('<?php echo $url; ?>')">

when the file is clicked, it alerts the page's url.

I have another page, test2.php.

I want the url that is being alerted to be displayed out in test2.php

How can I accomplish this?