This could be accomplished in many ways.
Send a redirect header after you're done doing whatever it is you need to do. PayPal will accept the posted data in the $_GET form as well as post, so taking the data, parsing it, and appending it the end of the url should work just fine.
Keep in mind that you can't guarantee a payment has made just because the user was forwarded to PayPal's website. They can easily close the tab or hit the back button and never pay, so don't mark them down as paid this way. Instead, consider the following:
#Do stuff on your site here first
$paypal_url = ''; //The location the data must be sent to
$paypal_data = array(); //The array of information to be sent
header('location:' . $paypal_url . '?' . http_build_query($paypal_data));
PayPal supports callback URL's so if someone sends a payment through the form, PayPal will send a "ping" (or notification) about it with the data for it back to your server. To avoid someone simulating the ping and getting something without really paying for it, you can then ping PayPal back confirming the data.
It goes something like this:
User makes a payment through PayPal
PayPal sends data about the payment to your callback URL
Your page pings the same data back to PayPal to confirm it's correct
PayPal responds with whether the data is valid or not
You can take actions with the data based on the response
It's very handy, however if you plan on doing this without an upgraded account, I don't believe you can use the sandbox (I could be wrong) so you may pay a fee for testing (you'd be better off getting some money in your PayPal so it won't fee you).
Helpful information on it:
PDN - How To Article - Adding PayPal Checkout to Your 3rd-party Shopping Cart - PayPal
IPN and PDT Variables - PayPal Developer
You can find more by Googling around. Hope this helps!