PHP curl not posting to correct fields -
i'm using curl retrieve data on post request, i'm having little trouble fields doesn't seem correctly posting correct fields. form consists of text area , submit button.
<form action="other.php" name="form1" id="formid" method="post"> <textarea rows="1" cols="1" id="txtareaid" name="txtareaname"></textarea> <input type="submit" id="btnid" name="btnname" value="btnvalue" title="btntitle"> this fields variable:
$this->fields = "txtareaname=". $this->num . "&btnname=btnid"; i not entirely sure how identify submit button in case..
and here curl array:
array( curlopt_url => $this->address, curlopt_post => true, curlopt_returntransfer => true, curlopt_postfields => $this->fields );
the submit button should be:
"&btnname=btnvalue" the value right of = should whatever in value= attribute of button.
Comments
Post a Comment