...
  if($step=='')
...
  if($step==2)
...
  if($step==3)大约34行
         $db_err=mysq-error();是个错误??里面还有好多错误的,楼主要多学习基础知识,写程序更要仔细。