下面这段代码的数据是写入order表的,我想要同时把realname这个字段,写进user表,要怎么操作呀?//post buy
if ( $_POST ) {
need_login();
$table = new Table('order', $_POST);
$table->quantity = abs(intval($table->quantity)); if ( $table->quantity == 0 ) {
Session::Set('error', '购买数量不能小于1份');
redirect( WEB_ROOT . "/team/buy.php?id={$team['id']}");

elseif ( $team['per_number']>0 && $table->quantity > $team['per_number'] ) {
Session::Set('error', '您本次购买本单产品已超出限额!');
redirect( WEB_ROOT . "/team.php?id={$id}"); 
} if ($order && $order['state']=='unpay') {
$table->SetPk('id', $order['id']);
} $table->user_id = $login_user_id;
$table->team_id = $team['id'];
$table->city_id = $team['city_id'];
$table->express = ($team['delivery']=='express') ? 'Y' : 'N';
$table->fare = $table->express=='Y' ? $team['fare'] : 0;
$table->price = $team['team_price'];
$table->credit = 0; if ( $table->id ) {
$eorder = Table::Fetch('order', $table->id);
if ($eorder['state']=='unpay' 
&& $eorder['team_id'] == $id
&& $eorder['user_id'] == $login_user_id
   ) {
$table->origin = team_origin($team, $table->quantity);
$table->origin -= $eorder['card'];
} else {
$eorder = null;
}

if (!$eorder){
$table->SetPk('id', null);
$table->create_time = time();
$table->origin = team_origin($team, $table->quantity);
} $insert = array(
'user_id', 'team_id', 'city_id', 'state', 
'fare', 'express', 'origin', 'price',
'address', 'zipcode', 'realname', 'mobile', 
'quantity', 'create_time', 're', 'condbuy',
);
if ($flag = $table->update($insert)) {
$order_id = abs(intval($table->id));
redirect(WEB_ROOT."/order/check.php?id={$order_id}");
}
}//each user per day per buy
if (!$order) { 
$order = json_decode(Session::Get('loginpagepost'),true);
settype($order, 'array');
if ($order['mobile']) $login_user['mobile'] = $order['mobile'];
if ($order['zipcode']) $login_user['zipcode'] = $order['zipcode'];
if ($order['address']) $login_user['address'] = $order['address'];
if ($order['realname']) $login_user['realname'] = $order['realname'];
$order['quantity'] = 1;
}
//end;$order['origin'] = team_origin($team, $order['quantity']);if ($team['max_number']>0 && $team['conduser']=='N') {
$left = $team['max_number'] - $team['now_number'];
if ($team['per_number']>0) {
$team['per_number'] = min($team['per_number'], $left);
} else {
$team['per_number'] = $left;
}
}