Yes this is a solution, but I want to keep the data sent to PayPal out of the HTML code. If you would use that solution someone can get the username from just checking the source from the page. /Peter -----Original Message----- From: Sumeet [mailto:mailing@xxxxxxxxxxxxxx] Sent: Monday, February 06, 2006 2:55 PM Cc: php-general@xxxxxxxxxxxxx Subject: Re: Submitting form without JavaScript Peter Lauri wrote: > Best mailing list member, > > I have an external payment gateway provider (similar to PayPal) and need to > send POST variables to them to initiate the Payment Process. > > Is there any function in PHP that can send POST variables to a URL without > using <form> and then a javascript that submits it when the page is loaded? You can submit pages to a url without using forms. there are several ways. check Snoopy class from sourceforge.net. but this is not an efficient way, because there are lot of redirection and responses and header informations with the payment gateway. Instead you should create a "confirmation" page. After submitting all the details of the form, php should then process it and create a "confirmation" page which the user has to again click to "confirm" the action. then the variables go to paypal via browser. > > My dream is to have a function (or class) that would be used this way: "dream"...really?.. mine is to own a merc. -- Sumeet Shroff http://www.prateeksha.com Web Design and Ecommerce Development, Mumbai India -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php