我正在使用一些 api 创建订票网站,我使用 json 获取和发布值并创建 php 会话以将数据传递到其他页面,第 1 页:创建会话的第 2 页:支付网关(我检查了会话的支付页面它工作正常)页面3:成功页面(从支付网关重定向到我的服务器页面后,会话在 chrome 浏览器中显示空值,但在 Firefox 中工作正常)。欢迎所有建议。在此先感谢。一些代码
<?php
session_start();
if(isset($_REQUEST['blockTicketId'])!=''){
$rootId= $_REQUEST['ruteId'];
if( $_REQUEST['dropPoint_'.$rootId]!=''){
$board = explode("_", $_REQUEST['dropPoint_'.$rootId]);
}
$_SESSION['formcity']=$_REQUEST['fromCity'];
$_SESSION['tocity']=$_REQUEST['toCity'];
$_SESSION['dateofjurny']=$_REQUEST['fromDate'];
$_SESSION['pickup']=$board[0];
$_SESSION['pickupTime']=$board[2];
$_SESSION['travelName']=$_REQUEST['travelNmae'];
$_SESSION['seat']=$_REQUEST['selectedSeat_'.$rootId];
echo $_SESSION['blockTicketNumber']=$_REQUEST['blockTicketId'];
$_SESSION['mobno']=$_REQUEST['bookerMob'];
$_SESSION['mailid']=$_REQUEST['bookerEmail'];
$_SESSION['user']=$_REQUEST['UserName_1'];
$_SESSION['amnt']=$_REQUEST['selectedSeatAmnt_'.$rootId];
?>
<html>
<head>
<script>
function submitPayuForm() {
var payuForm = document.forms.payuForm;
payuForm.submit();
}
</script>
</head>
<body onLoad="submitPayuForm()">
<form action="PayUMoney_form.php" method="post" name="payuForm">
<table>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td><input style="visibility:hidden" name="amount" value="<?php echo "1"; ?>" /></td>
<td></td>
<td><input style="visibility:hidden" name="firstname" id="firstname" value="<?php echo $_REQUEST['UserName_1']; ?>" /></td>
</tr>
<tr>
<td></td>
<td><input style="visibility:hidden" name="email" id="email" value="<?php echo $_REQUEST['bookerEmail']; ?>" /></td>
<td></td>
<td><input style="visibility:hidden" name="phone" value="<?php echo $_REQUEST['bookerMob']; ?>" /></td>
</tr>
<tr>
<td colspan="4"><input type="submit" style="visibility:hidden" value="Submit" /></td>
</tr>
</table>
</form>
</body>
</html>
<?php
}
?>