I assume this was a typo on your post, it doesn't look like it would compile with the extra space between "button" and "pressed".
if (button pressed == "save") {
I'd also make the parameter lists consistent between these two functions (shouldn't matter, but this is asking for bugs):
function SaveData($ID, $Info){
...
function SavetempData($Info, $ID){
I suspect the problem is in the query itself. You don't check to see if it succeeded, it seems like $Name should be in quotes since I assume its a character value (don't know why it would appear to work in one place and not the other, probably something else is faking you out):
$sSQL = "update myfilename set Name = $Name where ID = $ID";