01.
<form action=
"Testformx.php"
target=
"iframe_target"
method=
"post"
target=
"_blank"
>
02.
<label
for
=
"fname"
>รหัสลูกค้า :</label>
03.
<input type=
"text"
id=
"fname"
name=
"vardata"
><br><br>
04.
<input type=
"submit"
value=
"Submit"
>
05.
</form>
06.
07.
<?php
08.
header(
"Content-type:text/html; charset=UTF-8"
);
09.
header(
"Cache-Control: no-store, no-cache, must-revalidate"
);
10.
header(
"Cache-Control: post-check=0, pre-check=0"
, false);
11.
include
'Dbconnect.php'
;
12.
$sql
=
"SELECT * FROM Cust where CustID = '"
.
$_POST
[
"vardata"
].
"' limit 1"
;
13.
$result
= mysqli_query(
$conn
,
$sql
);
14.
$objResult
= mysqli_fetch_assoc(
$objQuery
);
15.
16.
?>
17.
<input type=
"text"
name=
"b[]"
value=
"<?=$objResult[Price];?>"
>