如何调试PHP警告"绑定变量的数量与准备好的语句中的字段数不匹配"?

时间:2015-07-28 14:43:07

标签: php mysql

这是我的Android登录注册应用程序的PHP代码,我的服务器地址是这样的:

  

警告:mysqli_stmt_bind_result()[function.mysqli-stmt-bind-result]:   绑定变量的数量与准备的字段数不匹配   /home/a6546950/public_html/FetchUserdetails.php中的声明在线   15

这是PHP:

<?php require_once( 'Connections/smpiconnection.php'); ?>
<?php require_once( 'Connections/smpiconnection.php'); ?>
<?php if (!function_exists( "GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue="" , $theNotDefinedValue="" ) { if (PHP_VERSION < 6) { $theValue=g et_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue=f
unction_exists( "mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue=( $theValue !="" ) ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue=(
$theValue !="" ) ? intval($theValue) : "NULL"; break; case "double": $theValue=( $theValue !="" ) ? doubleval($theValue) : "NULL"; break; case "date": $theValue=( $theValue !="" ) ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue=( $theValue
!="" ) ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } if (!function_exists( "GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue="" , $theNotDefinedValue="" ) { if (PHP_VERSION < 6) { $theValue=g
et_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue=f unction_exists( "mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue=( $theValue !=""
) ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue=( $theValue !="" ) ? intval($theValue) : "NULL"; break; case "double": $theValue=( $theValue !="" ) ? doubleval($theValue) : "NULL"; break; case "date": $theValue=( $theValue
!="" ) ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue=( $theValue !="" ) ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction=$ _SERVER[ 'PHP_SELF']; if (isset($_SERVER[ 'QUERY_STRING'])) { $editFormAction
.="?" . htmlentities($_SERVER[ 'QUERY_STRING']); } if ((isset($_POST[ "MM_update"])) && ($_POST[ "MM_update"]=="form1" )) { $updateSQL=s printf(
"UPDATE maklumat_pc SET Agensi=%s, Jabatan=%s, Work_Group=%s, Computer_Name=%s, Kategori_Infra=%s, Nama_Pengguna=%s, Jawatan=%s, Gred_Jawatan=%s, Kumpulan_Perubatan=%s, Tahun_Perolehan=%s, No_Aset=%s, Jenis_OS=%s, Jenama_PC=%s, Model_PC=%s, Model_Monitor=%s, Harga_Infra=%s, Cara_Perolehan=%s, Status_Antivirus=%s, Lesen_Antivirus=%s, Jenama_Antivirus=%s, Status_Penyelenggaraan=%s, Syarikat_Penyelenggaraan=%s, Status_Lan_Pc=%s, Ip_address=%s, Status_Infra=%s, Processor=%s, Ram=%s, Hard_Disk=%s WHERE No_Siri_Komputer=%s", GetSQLValueString($_POST[ 'Agensi'], "text"), GetSQLValueString($_POST[ 'Jabatan'], "text"), GetSQLValueString($_POST[ 'Work_Group'], "text"), GetSQLValueString($_POST[ 'Computer_Name'], "text"), GetSQLValueString($_POST[ 'Kategori_Infra'], "text"),
GetSQLValueString($_POST[ 'Nama_Pengguna'], "text"), GetSQLValueString($_POST[ 'Jawatan'], "text"), GetSQLValueString($_POST[ 'Gred_Jawatan'], "text"), GetSQLValueString($_POST[ 'Kumpulan_Perubatan'], "text"), GetSQLValueString($_POST[
'Tahun_Perolehan'], "int"), GetSQLValueString($_POST[ 'No_Aset'], "text"), GetSQLValueString($_POST[ 'Jenis_OS'], "text"), GetSQLValueString($_POST[ 'Jenama_PC'], "text"), GetSQLValueString($_POST[ 'Model_PC'], "text"), GetSQLValueString($_POST[ 'Model_Monitor'],
"text"), GetSQLValueString($_POST[ 'Harga_Infra'], "int"), GetSQLValueString($_POST[ 'Cara_Perolehan'], "text"), GetSQLValueString($_POST[ 'Status_Antivirus'], "text"), GetSQLValueString($_POST[ 'Lesen_Antivirus'], "text"), GetSQLValueString($_POST[
'Jenama_Antivirus'], "text"), GetSQLValueString($_POST[ 'Status_Penyelenggaraan'], "text"), GetSQLValueString($_POST[ 'Syarikat_Penyelenggaraan'], "text"), GetSQLValueString($_POST[ 'Status_Lan_Pc'], "text"), GetSQLValueString($_POST[ 'Ip_address'], "int"), GetSQLValueString($_POST[
'Status_Infra'], "text"), GetSQLValueString($_POST[ 'Processor'], "text"), GetSQLValueString($_POST[ 'Ram'], "text"), GetSQLValueString($_POST[ 'Hard_Disk'], "int"), GetSQLValueString($_POST[ 'No_Siri_Komputer'], "text")); mysql_select_db($database_smpiconnection,
$smpiconnection); $Result1=m ysql_query($updateSQL, $smpiconnection) or die(mysql_error()); $updateGoTo="maklumatpc1.php" ; if (isset($_SERVER[ 'QUERY_STRING'])) { $updateGoTo .=( strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .=$ _SERVER[
'QUERY_STRING']; } header(sprintf( "Location: %s", $updateGoTo)); } $editFormAction=$ _SERVER[ 'PHP_SELF']; if (isset($_SERVER[ 'QUERY_STRING'])) { $editFormAction .="?" . htmlentities($_SERVER[ 'QUERY_STRING']); } if ((isset($_POST[ "MM_update"])) && ($_POST[
"MM_update"]=="form1" )) { $updateSQL=s printf(
"UPDATE maklumat_pc SET Agensi=%s, Jabatan=%s, Work_Group=%s, Computer_Name=%s, Kategori_Infra=%s, Nama_Pengguna=%s, Jawatan=%s, Gred_Jawatan=%s, Kumpulan_Perubatan=%s, Tahun_Perolehan=%s, No_Aset=%s, Jenis_OS=%s, Jenama_PC=%s, Model_PC=%s, Model_Monitor=%s, Harga_Infra=%s, Cara_Perolehan=%s, Status_Antivirus=%s, Lesen_Antivirus=%s, Jenama_Antivirus=%s, Status_Penyelenggaraan=%s, Syarikat_Penyelenggaraan=%s, Status_Lan_Pc=%s, Ip_address=%s, Status_Infra=%s, Processor=%s, Ram=%s, Hard_Disk=%s WHERE No_Siri_Komputer=%s", GetSQLValueString($_POST[ 'Agensi'], "text"), GetSQLValueString($_POST[ 'Jabatan'], "text"), GetSQLValueString($_POST[ 'Work_Group'], "text"), GetSQLValueString($_POST[ 'Computer_Name'], "text"), GetSQLValueString($_POST[ 'Kategori_Infra'], "text"),
GetSQLValueString($_POST[ 'Nama_Pengguna'], "text"), GetSQLValueString($_POST[ 'Jawatan'], "text"), GetSQLValueString($_POST[ 'Gred_Jawatan'], "text"), GetSQLValueString($_POST[ 'Kumpulan_Perubatan'], "text"), GetSQLValueString($_POST[
'Tahun_Perolehan'], "int"), GetSQLValueString($_POST[ 'No_Aset'], "text"), GetSQLValueString($_POST[ 'Jenis_OS'], "text"), GetSQLValueString($_POST[ 'Jenama_PC'], "text"), GetSQLValueString($_POST[ 'Model_PC'], "text"), GetSQLValueString($_POST[ 'Model_Monitor'],
"text"), GetSQLValueString($_POST[ 'Harga_Infra'], "int"), GetSQLValueString($_POST[ 'Cara_Perolehan'], "text"), GetSQLValueString($_POST[ 'Status_Antivirus'], "text"), GetSQLValueString($_POST[ 'Lesen_Antivirus'], "text"), GetSQLValueString($_POST[
'Jenama_Antivirus'], "text"), GetSQLValueString($_POST[ 'Status_Penyelenggaraan'], "text"), GetSQLValueString($_POST[ 'Syarikat_Penyelenggaraan'], "text"), GetSQLValueString($_POST[ 'Status_Lan_Pc'], "text"), GetSQLValueString($_POST[ 'Ip_address'], "int"), GetSQLValueString($_POST[
'Status_Infra'], "text"), GetSQLValueString($_POST[ 'Processor'], "text"), GetSQLValueString($_POST[ 'Ram'], "text"), GetSQLValueString($_POST[ 'Hard_Disk'], "int"), GetSQLValueString($_POST[ 'No_Siri_Komputer'], "text")); mysql_select_db($database_smpiconnection,
$smpiconnection); $Result1=m ysql_query($updateSQL, $smpiconnection) or die(mysql_error()); $updateGoTo="updatepage.php" ; if (isset($_SERVER[ 'QUERY_STRING'])) { $updateGoTo .=( strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .=$ _SERVER[
'QUERY_STRING']; } header(sprintf( "Location: %s", $updateGoTo)); } if ((isset($_POST[ "MM_update"])) && ($_POST[ "MM_update"]=="form1" )) { $updateSQL=s printf(
"UPDATE maklumat_pc SET Jabatan=%s, Work_Group=%s, Computer_Name=%s, Kategori_Infra=%s, Nama_Pengguna=%s, Jawatan=%s, Gred_Jawatan=%s, Kumpulan_Perubatan=%s, Tahun_Perolehan=%s, No_Siri_Komputer=%s, No_Aset=%s, Jenis_OS=%s, Jenama_PC=%s, Model_PC=%s, Model_Monitor=%s, Harga_Infra=%s, Cara_Perolehan=%s, Status_Antivirus=%s, Lesen_Antivirus=%s, Jenama_Antivirus=%s, Status_Penyelenggaraan=%s, Syarikat_Penyelenggaraan=%s, Status_Lan_Pc=%s, Ip_address=%s, Status_Infra=%s, Processor=%s, Ram=%s, Hard_Disk=%s WHERE Agensi=%s", GetSQLValueString($_POST[ 'Jabatan'], "text"), GetSQLValueString($_POST[ 'Work_Group'], "text"), GetSQLValueString($_POST[ 'Computer_Name'], "text"), GetSQLValueString($_POST[ 'Kategori_Infra'], "text"), GetSQLValueString($_POST[ 'Nama_Pengguna'],
"text"), GetSQLValueString($_POST[ 'Jawatan'], "text"), GetSQLValueString($_POST[ 'Gred_Jawatan'], "text"), GetSQLValueString($_POST[ 'Kumpulan_Perubatan'], "text"), GetSQLValueString($_POST[ 'Tahun_Perolehan'], "int"), GetSQLValueString($_POST[
'No_Siri_Komputer'], "text"), GetSQLValueString($_POST[ 'No_Aset'], "text"), GetSQLValueString($_POST[ 'Jenis_OS'], "text"), GetSQLValueString($_POST[ 'Jenama_PC'], "text"), GetSQLValueString($_POST[ 'Model_PC'], "text"), GetSQLValueString($_POST[ 'Model_Monitor'],
"text"), GetSQLValueString($_POST[ 'Harga_Infra'], "int"), GetSQLValueString($_POST[ 'Cara_Perolehan'], "text"), GetSQLValueString($_POST[ 'Status_Antivirus'], "text"), GetSQLValueString($_POST[ 'Lesen_Antivirus'], "text"), GetSQLValueString($_POST[
'Jenama_Antivirus'], "text"), GetSQLValueString($_POST[ 'Status_Penyelenggaraan'], "text"), GetSQLValueString($_POST[ 'Syarikat_Penyelenggaraan'], "text"), GetSQLValueString($_POST[ 'Status_Lan_Pc'], "text"), GetSQLValueString($_POST[ 'Ip_address'], "int"), GetSQLValueString($_POST[
'Status_Infra'], "text"), GetSQLValueString($_POST[ 'Processor'], "text"), GetSQLValueString($_POST[ 'Ram'], "text"), GetSQLValueString($_POST[ 'Hard_Disk'], "int"), GetSQLValueString($_POST[ 'No_Siri_Komputer'], "text")); mysql_select_db($database_smpiconnection,
$smpiconnection); $Result1=m ysql_query($updateSQL, $smpiconnection) or die(mysql_error()); $updateGoTo="maklumatpc1.php" ; if (isset($_SERVER[ 'QUERY_STRING'])) { $updateGoTo .=( strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .=$ _SERVER[
'QUERY_STRING']; } header(sprintf( "Location: %s", $updateGoTo)); } if ((isset($_POST[ "MM_update"])) && ($_POST[ "MM_update"]=="form1" )) { $updateSQL=s printf(
"UPDATE maklumat_pc SET Jabatan=%s, Work_Group=%s, Computer_Name=%s, Kategori_Infra=%s, Nama_Pengguna=%s, Jawatan=%s, Gred_Jawatan=%s, Kumpulan_Perubatan=%s, Tahun_Perolehan=%s, No_Siri_Komputer=%s, No_Aset=%s, Jenis_OS=%s, Jenama_PC=%s, Model_PC=%s, Model_Monitor=%s, Harga_Infra=%s, Cara_Perolehan=%s, Status_Antivirus=%s, Lesen_Antivirus=%s, Jenama_Antivirus=%s, Status_Penyelenggaraan=%s, Syarikat_Penyelenggaraan=%s, Status_Lan_Pc=%s, Ip_address=%s, Status_Infra=%s, Processor=%s, Ram=%s, Hard_Disk=%s WHERE Agensi=%s", GetSQLValueString($_POST[ 'Jabatan'], "text"), GetSQLValueString($_POST[ 'Work_Group'], "text"), GetSQLValueString($_POST[ 'Computer_Name'], "text"), GetSQLValueString($_POST[ 'Kategori_Infra'], "text"), GetSQLValueString($_POST[ 'Nama_Pengguna'],
"text"), GetSQLValueString($_POST[ 'Jawatan'], "text"), GetSQLValueString($_POST[ 'Gred_Jawatan'], "text"), GetSQLValueString($_POST[ 'Kumpulan_Perubatan'], "text"), GetSQLValueString($_POST[ 'Tahun_Perolehan'], "int"), GetSQLValueString($_POST[
'No_Siri_Komputer'], "text"), GetSQLValueString($_POST[ 'No_Aset'], "text"), GetSQLValueString($_POST[ 'Jenis_OS'], "text"), GetSQLValueString($_POST[ 'Jenama_PC'], "text"), GetSQLValueString($_POST[ 'Model_PC'], "text"), GetSQLValueString($_POST[ 'Model_Monitor'],
"text"), GetSQLValueString($_POST[ 'Harga_Infra'], "int"), GetSQLValueString($_POST[ 'Cara_Perolehan'], "text"), GetSQLValueString($_POST[ 'Status_Antivirus'], "text"), GetSQLValueString($_POST[ 'Lesen_Antivirus'], "text"), GetSQLValueString($_POST[
'Jenama_Antivirus'], "text"), GetSQLValueString($_POST[ 'Status_Penyelenggaraan'], "text"), GetSQLValueString($_POST[ 'Syarikat_Penyelenggaraan'], "text"), GetSQLValueString($_POST[ 'Status_Lan_Pc'], "text"), GetSQLValueString($_POST[ 'Ip_address'], "int"), GetSQLValueString($_POST[
'Status_Infra'], "text"), GetSQLValueString($_POST[ 'Processor'], "text"), GetSQLValueString($_POST[ 'Ram'], "text"), GetSQLValueString($_POST[ 'Hard_Disk'], "int"), GetSQLValueString($_POST[ 'No_Siri_Komputer'], "text")); mysql_select_db($database_smpiconnection,
$smpiconnection); $Result1=m ysql_query($updateSQL, $smpiconnection) or die(mysql_error()); $updateGoTo="maklumatpc1.php" ; if (isset($_SERVER[ 'QUERY_STRING'])) { $updateGoTo .=( strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .=$ _SERVER[
'QUERY_STRING']; } header(sprintf( "Location: %s", $updateGoTo)); } $colname_Recordset1="-1" ; if (isset($_GET[ 'No_Siri_Komputer'])) { $colname_Recordset1=$ _GET[ 'No_Siri_Komputer']; } mysql_select_db($database_smpiconnection, $smpiconnection); $query_Recordset1=s
printf( "SELECT * FROM maklumat_pc WHERE No_Siri_Komputer = %s", GetSQLValueString($colname_Recordset1, "text")); $Recordset1=m ysql_query($query_Recordset1, $smpiconnection) or die(mysql_error()); $row_Recordset1=m ysql_fetch_assoc($Recordset1); $totalRows_Recordset1=m
ysql_num_rows($Recordset1); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>updateform</title>
</head>

<body>
  update form
  <form action="<?php echo $editFormAction; ?>" method="POST" name="form1" id="form1">
    <table align="center">
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Agensi:</td>
        <td>
          <input type="text" name="Agensi" value="<?php echo htmlentities($row_Recordset1['Agensi'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Jabatan:</td>
        <td>
          <input type="text" name="Jabatan" value="<?php echo htmlentities($row_Recordset1['Jabatan'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Work_Group:</td>
        <td>
          <input type="text" name="Work_Group" value="<?php echo htmlentities($row_Recordset1['Work_Group'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Computer_Name:</td>
        <td>
          <input type="text" name="Computer_Name" value="<?php echo htmlentities($row_Recordset1['Computer_Name'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Kategori_Infra:</td>
        <td>
          <input type="text" name="Kategori_Infra" value="<?php echo htmlentities($row_Recordset1['Kategori_Infra'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Nama_Pengguna:</td>
        <td>
          <input type="text" name="Nama_Pengguna" value="<?php echo htmlentities($row_Recordset1['Nama_Pengguna'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Jawatan:</td>
        <td>
          <input type="text" name="Jawatan" value="<?php echo htmlentities($row_Recordset1['Jawatan'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Gred_Jawatan:</td>
        <td>
          <input type="text" name="Gred_Jawatan" value="<?php echo htmlentities($row_Recordset1['Gred_Jawatan'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Kumpulan_Perubatan:</td>
        <td>
          <input type="text" name="Kumpulan_Perubatan" value="<?php echo htmlentities($row_Recordset1['Kumpulan_Perubatan'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Tahun_Perolehan:</td>
        <td>
          <input type="text" name="Tahun_Perolehan" value="<?php echo htmlentities($row_Recordset1['Tahun_Perolehan'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">No_Siri_Komputer:</td>
        <td>
          <?php echo $row_Recordset1[ 'No_Siri_Komputer']; ?>
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">No_Aset:</td>
        <td>
          <input type="text" name="No_Aset" value="<?php echo htmlentities($row_Recordset1['No_Aset'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Jenis_OS:</td>
        <td>
          <input type="text" name="Jenis_OS" value="<?php echo htmlentities($row_Recordset1['Jenis_OS'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Jenama_PC:</td>
        <td>
          <input type="text" name="Jenama_PC" value="<?php echo htmlentities($row_Recordset1['Jenama_PC'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Model_PC:</td>
        <td>
          <input type="text" name="Model_PC" value="<?php echo htmlentities($row_Recordset1['Model_PC'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Model_Monitor:</td>
        <td>
          <input type="text" name="Model_Monitor" value="<?php echo htmlentities($row_Recordset1['Model_Monitor'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Harga_Infra:</td>
        <td>
          <input type="text" name="Harga_Infra" value="<?php echo htmlentities($row_Recordset1['Harga_Infra'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Cara_Perolehan:</td>
        <td>
          <input type="text" name="Cara_Perolehan" value="<?php echo htmlentities($row_Recordset1['Cara_Perolehan'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Status_Antivirus:</td>
        <td>
          <input type="text" name="Status_Antivirus" value="<?php echo htmlentities($row_Recordset1['Status_Antivirus'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Lesen_Antivirus:</td>
        <td>
          <input type="text" name="Lesen_Antivirus" value="<?php echo htmlentities($row_Recordset1['Lesen_Antivirus'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Jenama_Antivirus:</td>
        <td>
          <input type="text" name="Jenama_Antivirus" value="<?php echo htmlentities($row_Recordset1['Jenama_Antivirus'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Status_Penyelenggaraan:</td>
        <td>
          <input type="text" name="Status_Penyelenggaraan" value="<?php echo htmlentities($row_Recordset1['Status_Penyelenggaraan'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Syarikat_Penyelenggaraan:</td>
        <td>
          <input type="text" name="Syarikat_Penyelenggaraan" value="<?php echo htmlentities($row_Recordset1['Syarikat_Penyelenggaraan'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Status_Lan_Pc:</td>
        <td>
          <input type="text" name="Status_Lan_Pc" value="<?php echo htmlentities($row_Recordset1['Status_Lan_Pc'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Ip_address:</td>
        <td>
          <input type="text" name="Ip_address" value="<?php echo htmlentities($row_Recordset1['Ip_address'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Status_Infra:</td>
        <td>
          <input type="text" name="Status_Infra" value="<?php echo htmlentities($row_Recordset1['Status_Infra'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Processor:</td>
        <td>
          <input type="text" name="Processor" value="<?php echo htmlentities($row_Recordset1['Processor'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Ram:</td>
        <td>
          <input type="text" name="Ram" value="<?php echo htmlentities($row_Recordset1['Ram'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">Hard_Disk:</td>
        <td>
          <input type="text" name="Hard_Disk" value="<?php echo htmlentities($row_Recordset1['Hard_Disk'], ENT_COMPAT, 'utf-8'); ?>" size="32" />
        </td>
      </tr>
      <tr valign="baseline">
        <td nowrap="nowrap" align="right">&nbsp;</td>
        <td>
          <input type="submit" value="Update record" />
        </td>
      </tr>
    </table>
    <input type="hidden" name="MM_update" value="form1" />
    <input type="hidden" name="No_Siri_Komputer" value="<?php echo $row_Recordset1['No_Siri_Komputer']; ?>" />
    <input type="hidden" name="MM_update" value="form1" />
  </form>
  <p>&nbsp;</p>
</body>

</html>
<?php mysql_free_result($Recordset1); ?>

1 个答案:

答案 0 :(得分:2)

问题正是错误所说的。您使用$name绑定到5个变量($collegename$batch$username$passwordmysqli_stmt_bind_result)。您的查询可能会选择比5更多(或可能更少)的字段。