01.
<?php
02.
03.
$amount
=
$_POST
[‘amount’];
04.
05.
$est_id
=
$_GET
[
'est_id'
];
06.
07.
$sql_count
=
"Select count(*) From tile"
;
08.
$rs
=mysql_query(
$sql_count
)
or
die
(mysql_error());
09.
$amount
=mysql_result(
$rs
,0,0);
10.
11.
$sql
=
"SELECT * from tile where est_id='"
.
$est_id
.
""
;
12.
$query
=mysql_query(
$sql
)
or
die
(mysql_error());
13.
while
(
$result
= mysql_fetch_array(
$query
))
14.
{
15.
16.
$tle_name
=
$result
[5];
17.
}
18.
}
19.
?>
20.
<form id=
"frmTile"
name=
"frmTile"
action=
"process_tile.php"
method=
"post"
>
21.
<input type=
"hidden"
id=
"amount"
name =
"amount"
value=
"<?=$amount;?>"
>
22.
<?
23.
for
(
$i
=1;
$i
<=
$amount
;
$i
++){
24.
?>
25.
<input type=
"text"
id=
"locate[<?=$i;?>]"
name =
"locate[<?=$i;?>]"
value=
"<?=$tle_name;?>"
>
26.
>
27.
<?
28.
}
29.
?>
30.
</form>