This code for getting order_no when click on link, I can't implement any javascript on this page because its work like template and its not the page appear in browser, any way its working fine but if i click on the link and open modal it shows the same order_no, I have to refresh page or open in new tab to get order_no. sorry for my english, wish you got what i mean
<td align='center' span style="font-weight:bold;"><a href ="edit.php?id=<?php echo $f_customer['order_no']?>" data-toggle = "modal" data-target = "#action"><?php echo $f_customer['order_no']?></a></td>
edit.php
<?php
require_once 'config.php';
$q_edit_student = $conn->query("SELECT * FROM `orders` WHERE `order_no` = '$_REQUEST[id]'") or die(mysqli_error());
$f_edit_student = $q_edit_student->fetch_array();
?>
<div class = "modal-content ">
<div class = "modal-body">
<div class="form-group col-xs-4 col-md-4">
<label for="name" class="control-label">Order Number</label>
<input type = "text" name = "order_no" id="order_no" value = "<?php echo $_REQUEST['id']?>"tabindex="1" class="form-control" autofocus />
</div>
From what little i am understanding from the question. I am guessing that you are trying to show an edit form for a particular order
Try the following
HTML
<a class="edit_link" href ="edit.php?id=<?php echo $f_customer['order_no']?>" data-toggle = "modal" data-target = "#action"><?php echo $f_customer['order_no']?></a>
Javascript
$(".edit_link").click(function(){
var href = $(this).attr('href');
$.get(href).done(function(data){
$("#action>.modal-body").html(data);
});
});
some thing like this will do it for you.