Question: I have a form on my website. When this form is submitted ( to the same page ) , a file is uploaded and all the details in the form are entered into a database. Next thing is we need to redirect to paypal for payment. Whats the best way to design this?

My form has the following fields:
name, email, password, attached file

PayPal Submission form is like this

```
<form id="frm_paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="JDEC8Q72KAYRN">
<input type="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form> 

```

**Note:**

I am not being able to redirect to paypal with post data using header('paypalurl')

Answer: 
The error occurs because the other end has disconnected and your write has failed. If you read quickly enough, it hasn't determined the connection has been lost.

There are ways to avoid this error, but the simplest thing to do is to ignore it
Recently saw this error caused by a lack of proxy set in JBoss config (I.e. standalone.xml). Add a proxy to your system properties if necessary - you can check if you need them by calling the web service with SoapUI.