Uninitialized string offset:
<p>I am getting the following error message and while I have looked at other areas no seems ot have the answer but only a solution. </p>

<p>PS I am still new at this as well</p>

<p>Can you please help me? Here is the error message</p>

<blockquote>
  <p>Notice: Uninitialized string offset: 0 in
  C:\wamp\www\Complaints\reporterrortrack.php on line 68</p>
  
  <p>Notice: Uninitialized string offset: 0 in
  C:\wamp\www\Complaints\reporterrortrack.php on line 69</p>
  
  <p>Notice: Uninitialized string offset: 0 in
  C:\wamp\www\Complaints\reporterrortrack.php on line 72</p>
  
  <p>Notice: Uninitialized string offset: 0 in
  C:\wamp\www\Complaints\reporterrortrack.php on line 72</p>
  
  <p>Notice: Uninitialized string offset: 0 in
  C:\wamp\www\Complaints\reporterrortrack.php on line 75</p>
</blockquote>

<pre><code>foreach (Array as ) { }
</code></pre>

<blockquote>
  <p>Notice: Undefined index: ErrConsultID in
  C:\wamp\www\Complaints\reporterrortrack.php on line 80</p>
  
  <p>Notice: Use of undefined constant EmployID - assumed 'EmployID' in
  C:\wamp\www\Complaints\reporterrortrack.php on line 80</p>
  
  <p>Notice: Uninitialized string offset: 0 in
  C:\wamp\www\Complaints\reporterrortrack.php on line 80</p>
  
  <p>Notice: Use of undefined constant username - assumed 'username' in
  C:\wamp\www\Complaints\reporterrortrack.php on line 80</p>
  
  <p>Notice: Undefined index: username in
  C:\wamp\www\Complaints\reporterrortrack.php on line 80</p>
</blockquote>

<p>Below if the code I am using</p>

<pre><code>             &lt;?php
             if (isset($_POST['submit'])){ 
                    $countUser=0;
                    $query= "SELECT EmployID, username FROM cssu";
                    if($result = mysql_query($query)) 
                    {
                        $userinfo=array();
                    while ($row = mysql_fetch_array($result))
                     {
                        $userinfo=$row;
                   $countUser++;
                   }
                   }

                 $query= "SELECT * FROM errortrack WHERE ErrDate between '$startdate' AND '$enddate'";
              $user="";
      if($result = mysql_query($query)) {
       echo "From Date Range ". $startdate. " " . "and " . $enddate; 
        echo"&lt;form action='viewtrack.php' method='post'&gt;
           &lt;input type=date name =startdate value =$startdate style=display:none&gt;
             &lt;input type=date name =enddate value =$enddate style=display:none&gt; 

    &lt;table border='1'&gt;  

               foreach ($userinfo as $user) 
                   {
            $user[EmployID]
            $user[username]

        &lt;tr  &gt;
&lt;th&gt;&lt;input type='submit' name='$user[username]' value='Veiw'&lt;?php echo '$user[username]'?&gt;'&lt;/th&gt;
 &lt;/tr&gt;
 &lt;tr style='background-color:blue; color:white; Width: 100px;'&gt;     
      &lt;th&gt;&lt;?php echo '$user[username]'?&gt;&lt;/th&gt;
              &lt;/tr&gt;
        }";
while($row = mysql_fetch_array($result))
  {
    if ($row['ErrConsultID'] == $user[EmployID]){$user[username]++; 

   }
    $count++; 
  }
             }                 

 echo "&lt;/table&gt;";
  echo "&lt;/form&gt;";
      }   
?&gt;
</code></pre>

<p>Any solutions or answers would be greatly Appreciated</p>
