Link to home
Start Free TrialLog in
Avatar of Fernanditos
Fernanditos

asked on

How to give individual action url to every "radio" button on my form submission?

Hi

I have the attached static HTML form with radio selector. For any selection I need to redirect to different urls that I will write manually.

How can I implement this?
<form action="index.php" method="post" id="idb" name="ExploreSearchForm">
  <div class="search_dropdown open"> <a href="#" class="searchFilter right"><span class="left"><span class="icon" style="font-size:22px;">Everything</span></span></a>
    <div class="searchFilters displayNone">
      <div class="search_top"></div>
      <div class="search_options">
        <h4>Search:</h4>
        <label for="id1-id2">
          <input type="radio" checked="checked" name="search_type"  value="radio17"/>
          Everything </label>
        <label for="id1-id3">
          <input type="radio" name="search_type" value="radio18"/>
          Updates </label>
        <label for="id1-id4" class="photos">
          <input type="radio" name="search_type"  value="radio19"/>
          Photos </label>
        <div align="left">
          <input type="submit"   id="idc" value="" class="searchSubmit" title="Search" name="ExploreSearchSubmitLink"/>
        </div>
      </div>
    </div>
  </div>
</form>

Open in new window

Avatar of gamebits
gamebits
Flag of Canada image

Send to one page, on that page redirect as needed depending on the radio button selected.
ASKER CERTIFIED SOLUTION
Avatar of Patrickjjs
Patrickjjs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fernanditos
Fernanditos

ASKER

Hi, Both solutions are working nice, the second one is working but it give me an warning error: "Notice: Undefined index: search_type in C:"

Sorry, the second one is  working perfect, the first one from Patrickjjs is returning the error.

Thank you guys for the great help.
You're welcome!
Hi Fernanditos, sorry I not tested my code. Happy you got answer.
Thanks for the points!