I have the following code which is giving me a warning when it runs
PHP Code:
  $sql "SELECT * FROM keyareas ORDER BY seq_no";
$keyareas = @mysql_query($sql);
  if (!
$keyareas) {
'<p class="error">Error retrieving data!<br />Error: '.mysql_error().'</p>'
  while (
$keyarea mysql_fetch_array($keyareas)) {
$keyarea $keyarea["keyarea"];
$fieldid "keyarea-".str_replace(" ""_"$keyarea);
'<label for="'.$fieldid.'"><input type="checkbox" name="'.$fieldid.'" id="'.$fieldid.'"'
    if (
strstr($keyareas$keyarea)) echo ' checked="checked"';
' /> '.$keyarea.'</label>'."\n";
The warning is strstr() expects parameter 1 to be string, resource given. I have similar code for several other tables within the same script which are not giving error messages. Not sure what I'm missing...