PHP code to user to another page which associated with the link
<p>I am following this <a href="http://stackoverflow.com/questions/14704556/how-do-i-create-a-link-that-sends-the-user-to-another-page-which-is-then-diverte">tutorial</a> - it is to redirect a user a URL based on the link in the previous page.</p>

<p>and I am trying this solution:</p>

<p>HTML</p>

<pre><code>&lt;a href="inter.php?target=1"&gt;Some page&lt;/a&gt;
&lt;a href="inter.php?target=2"&gt;Some page&lt;/a&gt;
&lt;a href="inter.php?target=something_else"&gt;Some page&lt;/a&gt;
</code></pre>

<p>inter.php</p>

<pre><code>&lt;?php
session_start();

$link='#';
switch($_GET['target']) {
  case 1:
    $link = "http://nexttarget.com";
    break;

  case 2:
    $link = "http://nexttarget2.com";
    break;

  case "something_else":
    $link = "http://nexttarget3.com";
    break;
}
$_SESSION['prev_link'] = "http://source_url";
?&gt;

&lt;form action="&lt;?php echo $link; ?&gt;" method="post" id="tc_form" &gt;
  &lt;p&gt;Your T&amp;amp;C here&lt;/p&gt;
  &lt;input type="checkbox" name="agree" value="agreed" onclick="javascript: this.parentNode.submit();" id="check" /&gt;
  &lt;label for="check"&gt;I agree to the T&amp;amp;C.&lt;/label&gt;
&lt;/form&gt;
</code></pre>

<p>The above code works perfectly fine. Though I don't want my users to agree with the Terms and Conditions. I just want them to click the link and be diverted. When I remove the HTML code not to have the terms and conditions. This is not working. What am I doing wrong?</p>

<p>I know I can have a URL directly to that page but I would like it to be done through the inter.php please.</p>
