Хорошо, вот.
include 'config.php';
$edit_sql = "SELECT * FROM zakaz_new, users WHERE users.id='$id_user' AND zakaz_new.ust='1'";
//echo $edit_sql.'<br>';
$query = mysqli_query($link, $edit_sql);
?>
<form method="POST" id="edit_form1" action="javascript:void(null);" onsubmit="call_edit()">
<table class="div_form_edit">
<tr>
<th></th>
<th>Дата</th>
<th>Время</th>
<th>Кабинет</th>
<th>Оборудование</th>
<th>ФИО</th>
<th>Примечание</th>
</tr>
<?php
while ($row = mysqli_fetch_assoc($query)) {
echo "<tr><td><input type='radio' name='id_zakaz_edit' value='".$row['id_zakaz']."' ></td><td>" . $row['data'] . "</td><td>" . $row['time_start'] . " - " . $row['time_end'] . "</td><td>" . $row['room'] . "</td><td>" . $row['oborudovanie'] . "</td><td>" . $row['F_name'] . " " . $row['L_name'] . "</td><td>" . $row['prim'] . " id: ".$row['id_zakaz']."</td></tr>";
}
?>
</table>
<br>
<input type="button" name="edit_form" value="Изменить" id="btn_edit_form">
</form>
<script>
$(document).ready(function() {
$('#btn_edit_form').click(function(){
$('.SmallWindow').show(function(){
call_edit();
});
$('.SmallWindowClose').click(function(){
$('.SmallWindow').hide();
});
});
});
function call_edit() {
var msg = $("#edit_form1").serialize();
//var msg = $('input[name=id_zakaz_edit]:checked').serialize();
$.ajax({
type: 'POST',
url: 'lib/edit.php',
data: msg,
success: function(data) {
$("span").html(data);
},
error: function(xhr, msg) {
alert('Возникла ошибка: ' + xhr.responseCode);
}
});
};
</script>
<div class="SmallWindow">
<div class="SmallWindowContent">
<div class="Content">
<p class="SmallWindowClose">X</p>
<span></span>
</div>
</div>
</div>