Jump to content


Photo

Weird Question


  • Please log in to reply
1 reply to this topic

#1 kaspm

kaspm
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 09 May 2006 - 04:57 PM

Is there a way to have a certain link show depending on what someone filled out in a form?
Say if someone picked 1 it would show a link, or if someone picked 3 it would show a different link?
Can anyone help

#2 jeremywesselman

jeremywesselman
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts
  • LocationIndependence, KY

Posted 09 May 2006 - 06:12 PM

As long as if it was after the form was submitted, yes, it is possible. Just use an if statement to accomplish this.

<?php
if($_POST['variable'] == "link1")
{
     echo('Link1');
}
elseif($_POST['variable'] == "link2")
{
     echo('Link2');
}
?>

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users