samedi 15 juillet 2017

Separated page link for php website

I am using this method for fetching data from the database to show them as a single page but it's giving me a link look like this one http://ift.tt/2t36em8. How can I make like this link instead of my one http://ift.tt/2umG7dG ?

<?php
                        $page = $_GET['v']; /* Page ID*/
            $sel_database ="";
                        if($page == 'gfx'){ $sel_database="SELECT * FROM table ORDER BY table_id DESC ";}
                        if($page == 'frontend'){ $sel_database="SELECT * FROM table1 ORDER BY table1_id DESC "; }
                        $qri_res = mysqli_query($con,$sel_database);
                        while($total_row=mysqli_fetch_array($qri_res)){ /** Data Fetching Start **/
                ?>
  <div class="container">
    <!--Gig start-->
    <div class="single-program">
      <div class="gig-title">
        <h2>
          <?php if($page == 'gfx'){?>
          <a href="post.php?v=<?= $total_row['gfx_id']?>&post=1">
            <?php echo $total_row['gfx_title'];?>
          </a>
          <?php }?>
          <?php if($page == 'frontend'){?>
          <a href="post.php?v=<?= $total_row['frontend_id']?>&post=2">
            <?php echo $total_row['frontend_title'];?>
          </a>
          <?php }?>
        </h2>
        <div class=" pricing">
          <?php
                                        if($page == 'gfx'){echo $total_row['gfx_price'];}
                                        if($page == 'frontend'){echo $total_row['frontend_price'];}
                                ?>
        </div>
      </div>
    </div>
  </div>
  <?php }?>
  <!-- Data Fetching end -->

Aucun commentaire:

Enregistrer un commentaire