The update you do will update every row in the table. Add a where-part to it to select what you want to update.
Also use or dir(...) to get the error if it is not working. Post the error here if you can't solve it yourself.
$sql="update config set Passwd='".$pass."', Template='".$temp."', Email='".$email."' where id = $id";
$result=mysql_query($sql, $conn) or die(mysql_error);
Edit: Don't just take the variables from POST. Use mysql_real_escape_string to make it safe for SQL injection.