1

システム用に次のコードがあります。

//get new data from text fields
$i = 0;
$data = array();
while ($i < 7){
    $data[$i] = $_POST['t'.$i];
    $i++;
}

//get the ID to use in the MySQL database query
$id=$data[0];

//get the existing integer from MySQL database
$query="SELECT * FROM tbl WHERE ID='$id';";
$result=mysql_query($query) or die(mysql_error());
$mem=mysql_result($result, 0, 'Member');

//print to see if it's equal
echo 'Does '.$mem.'='.$data[1].'?<br>';

//check equality
if ($mem != $data[1]){
    echo "I'm not supposed to exist";
}

$data[0] はそのデータベース テーブルの一意の ID であり、$data[1] は取得しようとしているものです。

コードはSame with$memとして出力されますが、何らかの理由で、ステートメントを介してそれらを渡すと、それらは等しくありません。999999.$data[0]999999.if

4

1 に答える 1