execute a function when a link is clicked
<p>basically i want to have a <code>link</code> inside a <code>div</code> when clicked it will display a <code>&lt;form&gt;</code></p>

<pre><code>&lt;sidebar&gt;
  &lt;h2&gt;Title&lt;/h2&gt;
  &lt;a href="display.php"&gt; Display &lt;/a&gt;
  &lt;hr&gt;

  //display here 

&lt;/sidebar&gt;
</code></pre>

<p>display.php</p>

<pre><code>function display() {
 $test = echo '&lt;input type="text" name="text"&gt;';
return 
}
</code></pre>

<p>the logic goes like, if i clicked the <code>href="display.php"</code> it will display the <code>function display();</code></p>

<p>how can i display the returned value in <code>display()</code> function below <code>&lt;hr&gt;</code></p>

<p>i cant seem to figure our the correct logic for it, </p>

<pre><code>&lt;hr&gt;
if (display() == true) {
     $test = echo '&lt;input type="text" name="text"&gt;';
return
}
</code></pre>
