title: Undefined variable inside textboxes
body: <p>As you can see I'm having an error inside my texboxes. Can anyone help me fix this error?</p>
  
  <p>Errors inside the textboxes are the following:</p>
  
  <pre><code>**
  
  &gt; aic:
  
  **
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: aic in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;34&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: aic in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;35&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: aic in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;36&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: aic in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;37&lt;/b&gt;&lt;br /&gt;
  
  **
  
  &gt; Name List:
  
  ** 
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: name in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;41&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: name in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;42&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: name in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;43&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: name in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;44&lt;/b&gt;&lt;br /&gt;
  
  &gt; **Address:**
  
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: address in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;48&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: address in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;49&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: address in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;50&lt;/b&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;b&gt;Notice&lt;/b&gt;:  Undefined variable: address in &lt;b&gt;C:\xampp\htdocs\test\index.php&lt;/b&gt; on line &lt;b&gt;51&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  
  <p>php code:</p>
  
  <pre><code>&lt;?php
  if(isset($_POST['code'])){
  include('include/connect.php');
  
  $batchcode = $_POST['code'];
  $sql = mysql_query("SELECT aic,batchcode,address,name FROM tb_app WHERE batchcode LIKE '$batchcode'");
  while($rows = mysql_fetch_array($sql)){
      $aic[] = $rows['aic'];
      $name[] = $rows['name'];
      $address[] = $rows['address'];
  }
  }
  ?&gt;
  </code></pre>
  
  <p>html code:</p>
  
  <pre><code>Search Batchcode:&lt;input type="text" name="code" id="query" /&gt;&lt;br /&gt;
  &lt;form&gt;
  &lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;
  aic: &lt;br /&gt;
  &lt;input type="text" name="optA1" value="&lt;?php echo $aic[0] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optA2" value="&lt;?php echo $aic[1] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optA3" value="&lt;?php echo $aic[2] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optA4" value="&lt;?php echo $aic[3] ?&gt;" /&gt; &lt;br /&gt;
  &lt;/td&gt;
  &lt;td&gt;
  Name List: &lt;br /&gt;
  &lt;input type="text" name="optB1" value="&lt;?php echo $name[0] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optB2" value="&lt;?php echo $name[1] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optB3" value="&lt;?php echo $name[2] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optB4" value="&lt;?php echo $name[3] ?&gt;" /&gt; &lt;br /&gt;
  &lt;/td&gt;
  &lt;td&gt;
  Address: &lt;br /&gt;
  &lt;input type="text" name="optC1" value="&lt;?php echo $address[0] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optC2" value="&lt;?php echo $address[1] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optC3" value="&lt;?php echo $address[2] ?&gt;" /&gt; &lt;br /&gt;
  &lt;input type="text" name="optC4" value="&lt;?php echo $address[3] ?&gt;" /&gt; &lt;br /&gt;
  &lt;/td&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I dont want my textboxes to be looped because each of them have unique name that ill be using with my javascript in the future.</p>