这是我的代码:
<html>
<HEAD>
<TITLE>Test Input</TITLE>
</HEAD>
<body>
<?php
$nume = $_GET['nume'];
$cif = $_GET['cif'];
$email = $_GET['email'];
$telefon = $_GET['telefon'];
$tip = $_GET['tip'];
$produs = $_GET['produs'];
$pret = $_GET['pret'];
$stoc = $_GET['stoc'];
$transport = $_GET['transport'];
$judet = $_GET['judet'];
$adresa = $_GET['adresa'];
$empty = $_GET['empty'];
?>
<form action="fgo-wise.php" method="get" >
Name: <input type="text" name="nume" value="<?php echo $nume;?>"><br>
TIP: <select name="tip">
<option value="pf">PF</option>
<option value="pj">PJ</option>
</select><br>
CIF: <input type="text" name="cif" value="<?php echo $cif;?>"><br>
E-mail: <input type="text" name="email" value="<?php echo $email;?>"><br>
Telefon: <input type="text" name="telefon" value="<?php echo $telefon;?>"><br>
Judet: <input type="text" name="judet" value="<?php echo $judet;?>"><br>
Adresa: <input type="text" name="adresa" value="<?php echo $adresa;?>"><br>
Produs/Serviciu: <input type="text" name="produs" value="<?php echo $produs;?>"><br>
Pret: <input type="text" name="pret" value="<?php echo $pret;?>"><br>
Cantitate: <input type="number" name="stoc" value="<?php echo $stoc;?>"><br><br>
<!--- Al doilea produs ---><br><br>
Produs/Serviciu: <input type="text" name="produs2"><br>
Pret: <input type="text" name="pret2" ><br>
Cantitate: <input type="number" name="stoc2" ><br>
UM: <input type="text" name="um"><br>
TVA: <input type="number" name="tva"><br><br>
<--- Transport ---><br><br>
Serviciu: <select name="transport">
<option value=""></option>
<option value="Transport Curier">Transport Curier</option>
</select><br><br>
Pret: <input type="text" name="prett"><br><br>
Cantitate: <select name="stoct">
<option value=""></option>
<option value="1">1</option>
</select><br><br>
UM: <select name="umt">
<option value=""></option>
<option value="buc">BUC</option>
</select><br><br>
TVA: <select name="tvat">
<option value=""></option>
<option value="19">19</option>
</select><br><br>
<input type="submit">
</form>
</body>
</html>
当我提交URL时,就像这样:
我只想提交填充字段。
答案 0 :(得分:-1)
使用if else语句验证值。您可以使用POST方法。 像:
<?php if(isset($nume)) { echo $nume; }?>