Found the answer myself...
foreach($_POST as $id=> $row){
$id=strtoupper($id);
$template->assign_var($id, $row);
}
From there I simply used {ID_NAME} to fill in the values.
End result was
<!-- IF ID_NAME -->
<input name="id_name" type="text" id="id_name" tabindex="1" value="<!-- IF ID_NAME -->{ID_NAME}<!-- ELSE -->60<!-- ENDIF -->"/>
The lower case name of the element was then changed to upper case in order to populate it's value.