我这里有一些问题,我无法解决它,我想从文本框中获取值并显示它,如果它在 mysql 中可用我目前在做什么:index.php
<form method="get" action="code.php">
<input name="code" type="text">
<input name="Submit" type="submit" value="submit">
</form>
至于我的code.php
<?php
$con=mysqli_connect("localhost","root","","code");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT Code , Status FROM data");
//while($row = mysqli_fetch_array($result))
//{
//echo $row['$_GET ""'] . " " . $row['Status'];
//echo "<br />";
//}
if(isset($_GET['Code']))
{
$Code=$_REQUEST['Code'];
$Status=$_REQUEST['Status'];
echo $Code; /* no value is echo */
echo $Status; /* no value is echo */
}
mysqli_close($con);
?>