Hola,
mysql_query("UPDATE texto SET txt='$_SESSION[txt]' WHERE user_id='$_SESSION[user_id] AND ttxt='$ttxt'") or die (mysql_error());