我尝试从文本框中获取值,但失败了。这是我的代码。你想要的是从文本框中获取值并将值与我数据库中的值匹配
<form action="" method="post">
<strong>Code: *</strong> <input type="text" name = "code" >
<input type="submit" name="submit" value="Submit">
</form>
<?php
$code= $_POST["code"];
$sql = "SELECT bookingref FROM starpick";
$result = $mysqli->query($sql);
while (list($bookingref )=$result->fetch_row())
{
if (($bookingref == $code) )
{
echo "Sorry, there was a problem uploading your file.";
}else
{
echo "==";
}
}
?>