把 id='$visited' 改成 id=$visited  試試看:$sql = "update jmyb set danw='$danw' WHERE id=$visited";
 mysql_query($sql);