It's really dependent on what you'd like to do.
There are a 3 viable options:
- Pass via querystring (ie doit.php?name=dan&password=password
- Use a session variable (best for constants you need to reuse during X session)
- Cookies (best for constants you need always - ie a keep-logged-in option)
For something as simple as you're doing, a querystring should be fine - it's easy to implement.
Make a request to your php page (doit.php) with the querystring added:
http://www.notaurl.codex/doit.php?name=dan&password=password
This then allows you to access said querystring in PHP like the following:
$username = $_GET['name'];
$password = $_GET['password'];
Easy.