title: Listing page redirect issue in php
body: <p>I'm working on php, I have fetched all the data from database and and I have to show listing the page,I have to show all the dynamic date in listing page &amp; I'm fetching all the data from database but how to redirect and show listing page, how I tried this I'm not getting please check my code and help me.</p>
  
  <p>Here my HTML code:</p>
  
  <pre><code>&lt;div class="col-lg-3 col-md-6  test" data-idtest="Diabetes"&gt;
                      &lt;a href="javascript:void(0);" class="box_cat_home"&gt;
                          &lt;i class="icon-info-4"&gt;&lt;/i&gt;
                          &lt;img src="assets/img/icon_cat_3.svg" width="60" height="60" alt=""&gt;
                          &lt;h3&gt;Diabetes&lt;/h3&gt;
                          &lt;ul class="clearfix"&gt;
                          &lt;li&gt;&lt;strong&gt;124&lt;/strong&gt;Doctors&lt;/li&gt;
                          &lt;!-- &lt;li&gt;&lt;strong&gt;60&lt;/strong&gt;Clinics&lt;/li&gt; --&gt;
                          &lt;/ul&gt;
                      &lt;/a&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>my Jquery code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
   $(document).ready(function() { 
          $('.test').click(function (){
              var id = $(this).data('idtest') ; 
              alert(id);
          $.ajax({
          type: "POST",
           url : "speciallist.php",
          data    : {id:id },
          cache: false,
          success: function(data){
             console.log(data);
          }
        });
        })
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here my PHP code:</p>
  
  <pre><code>&lt;?php
  $dbHost = 'localhost';
  $dbUsername = 'root';
  $dbPassword = 'mysql';
  $dbName = 'fre';
  $db = new mysqli($dbHost,$dbUsername,$dbPassword,$dbName);
  
  $id =$_REQUEST['id'];
  
        $men ="select * from tbl_users where doctor_speciality='$id'";
        $men_result=$db-&gt;query($men);
        $projects=array();
        while($row=mysqli_fetch_assoc($men_result)){ 
        $projects[] = $row;
    }
  ?&gt;
  </code></pre>
  
  <p>dynamic Listing page: speciallist.php</p>
  
  <pre><code>&lt;div class="col-lg-12 list-items"&gt;
                      &lt;?php foreach($projects as $row){
                      $userId = $row['userId'];?&gt;
                  &lt;div class="strip_list wow fadeIn"&gt;
                      &lt;a href="#0" class="wish_bt"&gt;&lt;/a&gt;
                      &lt;figure&gt;
                          &lt;!-- &lt;a href="detail.php"&gt;&lt;img src="http://via.placeholder.com/565x565.jpg" alt=""&gt;&lt;/a&gt; --&gt;
                          &lt;a href="detail.php?userId=&lt;?php echo $userId;?&gt;"&gt;&lt;img src="&lt;?php echo "admin/uploads"."/".$row['doctor_image']; ?&gt;"&lt;/a&gt;
                      &lt;/figure&gt;
                      &lt;a href="detail.php?userId=&lt;?php echo $userId;?&gt;"&gt;&lt;h3&gt;&lt;?php echo $row['name']; ?&gt;&lt;/h3&gt;&lt;/a&gt;
                      &lt;p&gt;&lt;!-- Doctor Education : --&gt; &lt;?php echo $row['doctor_education']; ?&gt;,&lt;?php echo $row['doctor_speciality']; ?&gt;&lt;/p&gt;
                      &lt;p&gt; 9 years experience&lt;/p&gt;
                      &lt;p&gt;Gynecologist/Obstetrician&lt;/p&gt;
                      &lt;!-- &lt;p&gt; Doctor Speciality : &lt;?php echo $row['doctor_speciality']; ?&gt;&lt;/p&gt; --&gt;
                      &lt;!-- &lt;p&gt;&lt;?php echo $row['doctor_profile']; ?&gt;&lt;/p&gt; --&gt;
                      &lt;p&gt;&lt;!--  Mobile : --&gt; &lt;?php echo $row['mobile']; ?&gt;&lt;/p&gt;
                      &lt;!-- &lt;p&gt;&lt;?php echo $row['doctor_profile']; ?&gt;&lt;/p&gt; --&gt;
                      &lt;!-- &lt;p&gt;Dr. Mr is a Senior Endodontist, specializes in Smile Designing, Single Visit Root Canal Treatments, Implants, Cosmetic Dentistry.&lt;/p&gt; --&gt;
                      &lt;div class="sideleft"&gt;
                          &lt;p&gt;Clinic Name:&lt;?php echo $row['clinic_name']; ?&gt;&lt;/p&gt;
                          &lt;p&gt;Clinic Address:&lt;?php echo $row['clinic_address']; ?&gt;&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;ul&gt;
                          &lt;li&gt;MON-SAT 9:00 AM - 9:30 PM&lt;/li&gt;
                          &lt;li&gt;&lt;a href="detail.php?userId=&lt;?php echo $userId;?&gt;"&gt;Book now&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/div&gt;
                  &lt;?php }?&gt;
                  &lt;/div&gt;
  </code></pre>