passing variables not working on a new tab

Question

I am trying to open a new tab with a specific url with variables on it but the variables are not passed on the second tab. please help me with this . Heres my code.

<?php
    $type= $_GET['type'];
    $brochure_id = $_GET['id'];
    $sql1 = "SELECT * from business_type WHERE business_id = '$type'";
    $q1= $conn->query($sql1);
    $q1->setFetchMode (PDO::FETCH_ASSOC);
    $location=" ";

        while($r1 = $q1->fetch())
        { 
            if($r1['business_type'] == "Hotel"){
                $location ="hotel.php";

            }
            else if($r1['business_type'] == "Restaurant"){
                $location ="restaurant.php";
            }
            else if($r1['business_type'] == "Resort"){
                $location ="resort.php";
            }
            else if($r1['business_type'] == "Spa"){
                $location ="spa.php";
            }
            else if($r1['business_type'] == "Entertainment"){
                $location ="entertainment.php";
            }
        }

    echo "<a  href='search-result-page-" . $location . "'?id='" . $brochure_id ."'' target='_blank' style='text-decoration: none'  >

    <div style='width: 260px; min-height: 30px; background-color:  rgba(180,180,180,0.5); position: absolute; z-index: 1000; font-size: 17px; padding: 5px; color: black'>" . $r['business_name'] . "</div>
    <img src='". $r['display_pic'] ."' width='260px' height='150px' />
    </a>
    </td>";

        if($maxcol==$column){
                echo "</tr>";
                $column=0;
                }
            }
    ?>

Show source
| pdo   | php   2017-01-07 17:01 0 Answers

Answers to passing variables not working on a new tab ( 0 )

Leave a reply to - passing variables not working on a new tab

◀ Go back