<form action="applications.php" enctype="multipart/form-data" method="post">
Value1: <input type="text" name="value"><br>
Value2: <input type="text" name="value1"><br>
<input type="submit" onmouseover="this.style.cursor=\'pointer\';"OnMouseOut="this.style.cursor=\'default\';">
</form>
<?php
if (isset($_GET['value=20'&&'value1=40']))
{
$username = 'root';
$password = '';
$hostname = 'localhost';
$dataname = mysql_connect($hostname,$username,$password) or die("Connection failed: ");
$selected = mysql_select_db('testdb',$dataname) or die("Could not select table1");
$result = mysql_query("SELECT * FROM `table1`");
$last = '';
echo "<table>
<tr>
<th>id</th>
<th>name</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo"<tr>
<td>".$row['0']."</th>
<td>".$row['1']."</td>
</tr>";
}
mysql_close($dataname);
}
?>
예를 들어 내가 value1 = 20 및 value2 = 40을 입력 한 경우 결과로 "table1 '을 얻어야합니다. 누구든지이 코드를 수정하도록 도와 주거나이 작업을 수행하는 다른 방법을 알려줄 수 있습니까?
값에 대한 경계가 잘못되었습니다 ... if (isset ($ _ GET [ 'value = 20'&& 'value1 = 40']))
해야한다
if ((isset ($ _ GET [ 'value']) && ($ _GET [ 'value'] == '20') && (isset ($ _ GET [ 'value2']) && ($ _GET [ 'value2'] = = '40'))
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다