0

I want to redirect the echo output result in next page..where am using echo "Result from SP procOutput_sum:::::$SP_VAL"; ...:::"SP_VAL" i want to refer this output next page..

 <?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 " &nbsp; 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";?>
Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
user3192801
  • 1
  • 1
  • 3

1 Answers1

0

I think instead of trying to redirect the echo, you should rather pass the content of this echo in the SESSION variable, then redirect to the other file in which you will acess again the SESSION variable in order to echo the previous content.

Here's an example: PHP Pass Data with Redirect

Community
  • 1
  • 1
Marek
  • 1,413
  • 2
  • 20
  • 36