I am looking for a way to direct a PHP form to a specific URL based on the user input. For example:
If user enters AA123 the URL would be http://sample.com/cgi-bin/lookup.cgi?OPT_M=AA_DETAIL&TICKET=AA123
If user enters BB123 the URL would be http://sample.com/cgi-bin/lookup.cgi?OPT_M=BB_DETAIL&TICKET=BB123
Any assistance is greatly appreciated.
Added:
I am able to create 2 separate radio buttons to accomplish this but would really like to do it without selecting the type. I am not sure where to go next. Below is what I have so far:
<form action="http://sample.com/cgi-bin/ticket.cgi" method="get">
<input type="radio" name="OPT_M" value="AA_DETAIL" />AA
<input type="radio" name="OPT_M" value="BB_DETAIL" />BB
Ticket: <input type="text" name="Ticket" /><br />
<input type="submit" value="Send" />
</form>