Note that there are some explanatory texts on larger screens.

plurals
  1. POcURL form cant show the information (very basic)
    text
    copied!<p>Hello people at StackOverflow,</p> <p>I am trying to learn some more on cURL and have come up with the following form:</p> <pre><code>&lt;?php //controleer of het formulier gesubmit is. Als dat zo is stuur de data door naar de link if(isSet($_POST['submit'])) { $ch = curl_init("http://jecom.nl/jecom/curl/receive.php"); //definieer de link curl_setopt($ch, CURLOPT_POST, true); //zet het type op post curl_setopt($ch, CURLOPT_POSTFIELDS, "sender=" .$sender."&amp;receiver=".$receiver.""); //stuur de gegevens uit het formulier door naar de link curl_exec($ch); //Zet de output op het scherm if (curl_errno($ch)) { print curl_error($ch); //Als er een fout is geef deze dan } else { curl_close($ch); //Sluit de link met de website } } else { ?&gt; &lt;form method="POST" action="&lt;? echo $_SERVER['PHP_SELF']; ?&gt;" name="login"&gt; &lt;table width="100%"&gt; &lt;tr align="center"&gt; &lt;td width="50%" align="right"&gt;&lt;font color="navy"&gt;Sender&lt;/font&gt;&lt;/td&gt; &lt;td width="50%" align="left"&gt;&lt;input type="text" name="sender" size="50"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr align="center"&gt; &lt;td width="50%" align="right" width="100"&gt;&lt;font color="navy"&gt;Receiver&lt;/font&gt;&lt;/td&gt; &lt;td width="50%" align="left"&gt;&lt;input type="text" size="50" name="receiver"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr align="center"&gt; &lt;td width="50%" align="right" width="100"&gt;&lt;font color="navy"&gt;Amount&lt;/font&gt;&lt;/td&gt; &lt;td width="50%" align="left"&gt;&lt;input type="text" size="50" name="amount"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr align="center"&gt; &lt;td colspan="2" align="center"&gt;&lt;input name="submit" type="submit" value="Inloggen"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;? } ?&gt; </code></pre> <p>And this is my receiving end script:</p> <pre><code> &lt;?php // recipient.php $sender = ($_POST["sender"]); $receiver = ($_POST["receiver"]); $amount = ($_POST["amount"]); print "Greetings, visitor from {$_SERVER['REMOTE_ADDR']}"; echo ($_POST['sender']); ?&gt; </code></pre> <p>It is not showing my echo. Even though I think cURL is enabled on both servers.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload