"there will be 3 inputs with the same ID"
I do not know how your code is, but just to show you that you can retrieve everything from the other side of the php - even with elements of the same id.
I suggest you dynamically generate the id (I do not know if that's your question) but here's a code that shows you how to pass information and retrieve with POST in php.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form action="test.php" method="post">
<input id="as" type="text" name="valor[]" value="1"><br>
<input id="as" type="text" name="valor[]" value="2"><br>
<input id="as" type="text" name="valor[]" value="3"><br>
<input id="as" type="submit" value="Submit">
</form>
<?php
$arr=$_POST["valor"];
echo '<pre>';
print_r($arr);
echo '</pre>';
?>
</body>
</html>
Notice what happens in the POST array:
TestthiscodetoretrievevaluesusingclassesandnotIds
//HTML<formaction="test.php" method="post">
<input id="as" class="tosend" type="text" name="valor[]" value="1"><br>
<input id="as" class="tosend" type="text" name="valor[]" value="2"><br>
<input id="as" class="tosend" type="text" name="valor[]" value="3"><br>
<input id="btntosend" class="btntosend" type="submit" value="Submit">
</form>
//Js
$('#btntosend').on( 'click', function(e) {
e.preventDefault();
$('.tosend').each(function() {//Passar por cada radio da classe rdShipMo
alert($(this).val());
});
});
See the fiddle . You do not even need the ID.