$newInt = substr_replace($oldInt, $newDigit, $position, 1);
$newValue = (string)$newInt;
echo $newValue;
echoes 0000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
(what i want!)
mysql_query("UPDATE table SET $fieldVariable = $newValue WHERE userID = '".$_SESSION['userID']."' ")or die("Query failed:".mysql_error());
mysql record shows
999999999999999999999999999999999999999999999999999
mysql field is set varchar (100)
add quotes around $newValue, since it is a VARCHAR field