我想在下一页重定向回显输出结果。使用echo"来自SP的结果procOutput_sum ::::: $ SP_VAL&#34 ;; ... :::" SP_VAL"我想在下一页参考这个输出..
<?php
$ipAddress=$_SERVER['REMOTE_ADDR'];
$macAddr=false;
$out_put="";
//echo "Your IP address is : $ipAddress";
#run the external command, break output into lines
$arp=`arp -a $ipAddress`;
$lines=explode("\n", $arp);
#look for the output line describing our IP address
foreach($lines as $line)
{
$cols=preg_split('/\s+/', trim($line));
if ($cols[0]==$ipAddress)
{
$macAddr=$cols[1];
}
}
?>
<?php
if(isset($_POST['webpanel'])){
$mobileno=$_POST['mobileno'];
$fname=$_POST['fname'];
$email=$_POST['femail'];
$fmessage=$_POST['fmessage'];
$colorRadio=$_POST['colorRadio'];
$demo1=$_POST['demo1'];
$flag="CALL_ORIGIN";
$client="GALACTIC";
$mysqli = mysqli_connect("localhost", "root", "", "call_conference");
$call = $mysqli->prepare('CALL CALL_ORIGIN(?, ?, ?, ?, ?, ?, ?, ?, ?, ?,@out_put)');
$call->bind_param('ssssssssss',$mobileno,$flag,$fname,$email
,$fmessage,$ipAddress,$macAddr, $colorRadio,$demo1,$client);
$call->execute();
$select = $mysqli->query('SELECT @out_put');
$result = $select->fetch_assoc();
$SP_VAL = $result['@out_put'];
echo "Result from SP procOutput_sum:::::$SP_VAL";
if(empty($mobileno) || empty($fname)){
echo "SP OUT_VAL:$output";
echo "<label class='err'>All field is required</label>";
}
elseif(!is_numeric($mobileno)){
echo "<label class='err'>Mobile no must be numeric</label>";
}
else{
echo " Your IP address is : $ipAddress and Your Mac address is:$macAddr and CALL_SCHEDULER_TIME::: $demo1";
}
}
?>
<body style="background:white;">
<center>
<h3>Hi <?php echo $fname; ?></h3><br/>
<h2>Your call is transferred to our Server</h2>
<img src="img/phone.gif">
</center>
<br/>
<?php echo "Result from SP procOutput_sum:::::$SP_VAL";?>
答案 0 :(得分:0)
我认为不应该尝试重定向回声,而是应该在SESSION
变量中传递此回音的内容,然后重定向到另一个文件,在该文件中您将再次访问SESSION
变量为了回应以前的内容。
这是一个例子: PHP Pass Data with Redirect