Since you are using paypal standard as the Gateway, you will not be able to do that.
Paypal standard is on e of the most difficult payment services to work with.
The confirm page is set to post the cart information to the paypal server to begin the checkout process, because it must post information to paypal, you cannot act on the form post, that post is sent to the paypal server.
With paypal standard, the order needs to be stored in the database when the checkout page posts to the confirm page. You order table should have a status column in it, that column should use the default value of pending.
one of the main difficulties with paypal standard is that it is not a real time service. When the order is placed, it is not processed with the mechant bank i real time, it is placed in a que to be processed on a first come first served basis.
this means that when the customer goes to paypal, sets up the payment and directed back to your site to the checkout success page page, you dont actually know the status of the order yet.
PayPal uses an IPN (Instant Payment Notification) system to post the results of the transaction to your site when the order is processed through the merchant bank.
you need to configure a page to accept this IPN Post and update the status of the order.
more details on IPN can be found here:
ipn
If at all possible, I recommend using payments pro instead of standard, the small monthly fee is well worth the headaches of configuring payment standard and IPN.