You missed my point completely.... In the "value" of the submit button, put $vals[0]...
<?php
foreach($details as $vals)
{
?>
<tr>
<form action="" method="post">
<td align="center"><?php echo $vals[0]; ?></td>
<td align="center"><?php echo $vals[1]; ?></td>
<td align="center"><?php echo $vals[2]; ?></td>
<td align="center"><input name="orginfo" type="submit" id="orginfo" value="<?php echo $vals[0]; ?>" /></td>
</form>
</tr>
<?php
}//foreach ends here.
?>
Then, each time any submit button is pressed, the value of the post array key "orginfo" is the value of $vals[0]. Then you don't even need the javascript call (which is nothing anyway...).
Then in you php file, just do whatever based upon the value of $_POST['orginfo'].
Not to mention that you could just properly close the <form> and <tr> it would work too 😉