01.
<html>
02.
<head>
03.
<script language=
"JavaScript"
type=
"text/JavaScript"
>
04.
<!--
05.
function
MM_jumpMenu(targ,selObj,restore){
06.
eval
(targ+
".location='"
+selObj.options[selObj.selectedIndex].value+
"'"
);
07.
if
(restore) selObj.selectedIndex=0;
08.
}
09.
10.
</script>
11.
</head>
12.
<body>
13.
<form action=
"phpMySQLAddSave.php"
name=
"frmAdd"
method=
"post"
>
14.
Select Line :
15.
<select name=
"menu1"
onChange=
"MM_jumpMenu('parent',this,0)"
>
16.
<?php
17.
for
(
$i
=1;
$i
<=50;
$i
++)
18.
{
19.
if
(
$_GET
[
"Line"
] ==
$i
)
20.
{
21.
$sel
=
"selected"
;
22.
}
23.
else
24.
{
25.
$sel
=
""
;
26.
}
27.
?>
28.
<option value=
"<?php echo $_SERVER["
PHP_SELF
"];?>?Line=<?php echo $i;?>"
<?php
echo
$sel
;?>><?php
echo
$i
;?></option>
29.
<?php
30.
}
31.
?>
32.
</select>
33.
<table width=
"471"
border=
"1"
>
34.
<tr>
35.
<th width=
"91"
> <div align=
"center"
>Barcode </div></th>
36.
<th width=
"160"
> <div align=
"center"
>Type </div></th>
37.
<th width=
"198"
> <div align=
"center"
>Size</div></th>
38.
</tr>
39.
<?php
40.
$line
=
$_GET
[
"Line"
];
41.
if
(
$line
== 0){
$line
=1;}
42.
for
(
$i
=1;
$i
<=
$line
;
$i
++)
43.
{
44.
?>
45.
<tr>
46.
<td><div align=
"center"
><input type=
"text"
name=
"txtBarcode<?php echo $i;?>"
size=
"10"
></div></td>
47.
<td><input type=
"text"
name=
"txtType<?php echo $i;?>"
size=
"20"
></td>
48.
<td><input type=
"text"
name=
"txtSize<?php echo $i;?>"
size=
"20"
></td>
49.
</tr>
50.
<?php
51.
}
52.
?>
53.
</table>
54.
<input type=
"submit"
name=
"submit"
value=
"submit"
>
55.
<input type=
"hidden"
name=
"hdnLine"
value=
"<?php echo $i;?>"
>
56.
</form>
57.
</body>
58.
</html>