cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: Post Form id

From: Dan O. <vah330_at_excite.com>
Date: Wed, 13 Oct 2004 03:12:13 -0400 (EDT)

> So only difference between HTML example and
> cURL is "form id", also

> if I throw "form id" out, HTML example does not work anymore.

No because the JavaScript probably no longer works either.

In the code you posted previously, the "id" in "document.id.submit();" is just telling JavaScript *which* form to submit. In that case a form with an ID of "id" is being submitted.

BUT, you said your form has this line:

<form id=admin action="www.somesite.com/test.asp" method="POST">

In which case the JavaScript would need to be document.admin.submit(); in order to submit it because that line says the form ID is "admin".

Are you sure there isn't more JavaScript code which is relevant?? JavaScript can be used to *set* form field values before submitting a form BTW. Maybe the JS code you didn't post is responsible for setting one (or more) form variables?

I agree with Daniel that you should change the *original* form to a GET and look to see exactly what name/value pairs are being submitted and then replicate them in your PHP code.

JMO

Dan O.

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
Received on 2004-10-13