I have modified the Paypal button on the 'thank you' page so thatname and address gets passed to paypal so the customer doesnt have to re-enter it. The new code is
<?php
// display PayPal checkout?
$form = '
<form target="PayPal" action="
https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_ext-enter">
<input type="hidden" name="redirect_cmd" value="_xclick">
<input type="hidden" name="business" value="'.$paypal_email.'">
<input type="hidden" name="item_name" value="'.$dbts_title.' Order '.$orderid.'">
<input type="hidden" name="item_number" value="'.$orderid.'">
<input type="hidden" name="amount" value="'.number_format($_SESSION['nettotal'], 2).'">
<input type="hidden" name="currency_code" value="'.$currency.'">
<input type="hidden" name="shipping" value="'.$_SESSION['shipping1'].'">
<input type="hidden" name="handling" value="'.$_SESSION['handling'].'">
<input type="hidden" name="return" value="'.$paypal_thankyoupage.'">
<input type="hidden" name="cancel_return" value="'.$paypal_cancelpage.'">
<input type="hidden" name="undefined_quantity" value="0">
<input type="hidden" name="receiver_email" value="'.$paypal_email.'">
<input type="hidden" name="no_shipping" value="'.$require_address.'">
<input type="hidden" name="no_note" value="'.$allow_message.'">
<input type="hidden" name="first_name" value="'.$_SESSION['firstname'].'">
<input type="hidden" name="last_name" value="'.$_SESSION['lastname'].'">
<input type="hidden" name="address1" value="'.$_SESSION['address'].'">
<input type="hidden" name="address2" value="'.$_SESSION['address2'].'">
<input type="hidden" name="city" value="'.$_SESSION['city'].'">
<input type="hidden" name="state" value="'.$_SESSION['state'].'">
<input type="hidden" name="zip" value="'.$_SESSION['zip'].'">
<input type="image" name="submit" src="
http://images.paypal.com/images/x-click-but6.gif" alt="Make payments with PayPal, it\'s fast, free, and secure!">
</form>
';
echo $form;
?>
I found it better not to pass the email address as Paypal assumes your customer has a paypal account and doesn't dispay the name and address data but here it is incase anyone needs it
<input type="hidden" name="email" value="'.$_SESSION['email'].'">
Regards
Paul