Agregales la verificacion de error con esto:
Código PHP:
mysql_query("INSERT INTO tablaptosA(idproducto) VALUES('$datopto')") or die("Error de ingreso: ".mysql_error());
mysql_query("UPDATE tablaptosB SET activar='Si' where idproducto='$datopto'") or die("Error de Update: ".mysql_error());
Suerte!