Hallo!
I have two files: curl.php and form.php
this is curl.php file
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://www.example.com/form.php");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, "txt=$txt&submit=submit");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
print $result;
and that is form.php file
<form action="form.php" method="post">
<input name="txt" type="text" />
<input name="submit" type="submit" value="submit" />
</form>
When pushing the button "submit", I receive the score of the file form.php
I want submitting data display in curl.php file.
Where my mistake is?
How should I receive the data in curl.php
😕