-3

Hello i am trying to send the ID other page I am trying to get the value of my vids but I can not get the value I only get $vid[$x] to other page can someone help me.

<?php

        for ($x = 0; $x <= $n; $x++)
        {
            $data = get_imei($imei[$x]);
            $datas = explode("*", $data);
            $offlines = $datas[0];
            $offline = get_offline($offlines);
            
            if($offline == "Offline")
             {
                echo "<tr>
              <th>$x</th>
                <th>$accntid[$x]</th>
                <th>$fname[$x]</th>
                <th>$lname[$x]</th>
                <th>$vid[$x]</th>
                <th>$vplatenum[$x]</th>
                <th>$imei[$x]</th>
               <th>$datas[1]</th>
                <th>$datas[0]</th>
                <th>$offline</th>";
               echo "<th>";
               echo '<button><a href="TroubleHistory.php?vids=echo $vid[$x]">View Troubleshoot History</button>';
               echo"</th>";
               echo "</tr> "; 
             }
            else
             {
                
             }  

                        
        }


         ?>

1 Answers1

0

you have an echo inside an echo. Your code should look more like this:

 echo '<button><a href="TroubleHistory.php?vids='.$vid[$x].'">View Troubleshoot History</button>';

$vid[$x] should be your ID or whatever you want to send.

Steve Kirsch
  • 175
  • 1
  • 10