哪个老哥能帮忙写一句代码,如果txopenid=txopenid且openid不等于openid那么更新openid
$D = db('');
$user = $D ->setbiao('user')-> where( array( "txopenid" => $txopenid ) ) -> find();
if (is_array($user)) {
$_SESSION['uid'] = $user['uid'];
$key = md5('wuwei'.$_SESSION['uid']);
$data = ['uidw'=>$_SESSION['uid'],'key'=>$key];
$sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='".$_SESSION['backurl']."' method='post'>";
while ( list ( $key, $val ) = each ( $data ) ) {
$sHtml.= "<input type='hidden' name='".$key."' value='".$val."'/>";
}
$sHtml = $sHtml."<input type='submit' style='display:none'></form>";
$sHtml = $sHtml."<script>document.forms['alipaysubmit'].submit();</script>";
echo $sHtml;
exit();
|