Question: I want to get `'id'` from url and using in my Bootstrap modal.
How to get this `'69'`.In my modal i using this `'69'` with SQL request. 

[![enter image description here](https://i.stack.imgur.com/C01Zl.jpg)](https://i.stack.imgur.com/C01Zl.jpg)

Answer: 
I Hope, your JS code is somehow similar to it.

```
<script>
    $('.Contact').click(function(){
        var id=$('.Contact').val();
        $.ajax({url:"ModalPage.php?id="+id,cache:false,success:function(result){
            $(".modal-content").html(result);
        }});
    });
</script>

```

In, **ModalPage.php**

```
<?
$id=$_GET['id'];

  // Now, use this 'id'.
?>

```
an easy trick is to make hidden input inside modal code as below 

```
<div id="myModal">
   <form>
     <input type="hidden" value="<?php echo isset($_GET['id']?$_GET['id']:''); ?>" /> <!--if you want to make it hidden-->
     <label>ID = <?php echo isset($_GET['id']?$_GET['id']:''); ?></label><!--if you want to display-->
      <!--your code-->
   </form>
</div>

```