01.
<script type=
"text/javascript"
>
02.
function
click_btm_category(id){
03.
$.post(
'show.php'
,
04.
{show_lest_product: $(
'#show_lest_product'
+id).val()},
05.
function
(output){
06.
$(
'#show_click_on_tab2'
).html(output).show();
07.
}
08.
);
09.
}
10.
</script>
11.
12.
<?php
13.
$sql
=
"select * from category order by c_id Asc "
;
14.
$rs
=mysql_query(
$sql
);
15.
while
(
$rows
=mysql_fetch_array(
$rs
)){
16.
$c_id
=
$rows
[
'c_id'
];
17.
?>
18.
<form name=
"form_show"
>
19.
<input type=
"hidden"
id=
"show_lest_product<?php echo $c_id;?>"
value=
"<?php echo $c_id;?>"
/>
20.
<input type=
"button"
value=
"ส่งข้อมูล"
onclick=
"click_btm_category(<?php echo $c_id;?>);"
>
21.
</form>
22.
<?php
23.
}
24.
?>