I have two different groups of radio buttons inside of a form.
When the submit button is clicked I would like to pass the "value" of the radio buttons to variables, then use the variables to call a new page via window.location

Sample Form

<Input type = 'Radio' Name ='firstp' value= 'starturl'>1
<Input type = 'Radio' Name ='firstp' value= 'starturl1'>2
<Input type = 'Radio' Name ='firstp' value= 'starturl2'>3


<Input type = 'Radio' Name ='secondp' value= 'endurl'>1
<Input type = 'Radio' Name ='secondp' value= 'endurl1'>2
<Input type = 'Radio' Name ='secondp' value= 'endurl2'>3

<input type="button" value="New Page" style="height: 40px; width: 180px; font-size: 17px;" onclick="move()" />

JAVASCRIPT(or lack there of)

<script language="JavaScript">
function move() {

var beginURL = value from radio firstp
var endURL = value from radio secondp

window.location = beginURL + endURL

Of course I am new to javascript and I am just trying to explain in text what I am looking to do with this javascript code above, as I am little confused at this point.

I will have multiple pages created that will have the exact names as the beginURL + endURL.
Example if 2nd radio box was selected in both sections this page would load page starturl1endurl1.php

Also thoughts on whether Javascript or PHP is best suited for this?