我是 PHP 新手。我想获取另一个文档中的变量,以便将值插入表中。所以,我有这个代码:insert.php:
$inputField = $_POST['inputField'];
$inputField2 = $_POST['inputField2'];
$Allowed_traffic = $_POST['Allowed_traffic'];
$Frequency = $_POST['Frequency'];
$sql="INSERT INTO users_fup (fup_id, user_id, ModemSn, start_date, end_date, allowed_traffic, realized_traffic, frequency, nextreset, whichdb) VALUES ('NULL','','', '".$inputField."', '".$inputField2."', '".$Allowed_traffic."', '', '".$Frequency."', '', '')";
我想从另一个文件中获取 ModemSn,其中包含:
$ffup = mysql_query("SELECT * FROM users_fup WHERE ModemSn = '".$row['ModemSn']."' AND start_date < '$oraoggi' AND end_date > '$oraoggi' ");
.
.
echo "<td>".$row['ModemSn']."</td><td>".$percent_traffic."</td><td>linksetfup</td><td></td></tr>";
这些文件不在同一个文件夹中。