My problem is that my query on a MySql-table with php doesn't work on the Mac.

I have made a similar search-form earlier that is just fine on all platforms.

Isn't php sending pure html to the webserver?
And if the output of html where incorrect (unclosed tables, nested form tags ...), then I suppose it wouldn't work on NS pc either?!

Anyone that recognize the problem?

<code>

switch($search):
case "Sök":
/* Build the query string from the data passed in. */
$NUM_RECS = intval($NUM_RECS);
$query = "SELECT * FROM " . $table;
$action = " WHERE ";
if($searchfor <> ""):
$query .= $action ."(verk LIKE '%" . $searchfor . "%' OR rescensioner LIKE '%" . $searchfor . "%' OR verkkommentar LIKE '%" . $searchfor . "%')";
$action = " AND ";
endif;
if($beskrivning <> ""):
$query .= $action . "beskrivning = '" . $beskrivning . "'";
$action = " AND ";
endif;
if($aerefter <> ""):
$query .= $action . "aer >= '" . $aerefter . "'";
$action = " AND ";
endif;
if($aerfore <> ""):
$query .= $action . "aer <= '" . $aerfore . "'";
$action = " AND ";
endif;
$query .= " ORDER BY '" . $order . "'";
$query .= " LIMIT " . ($offset != 0 ? "$offset, $NUM_RECS" : "$NUM_RECS");

$countquery = "SELECT count(*) AS numrows FROM " . $table;
$action = " WHERE ";
if($searchfor <> ""):
$countquery .= $action ."(verk LIKE '%" . $searchfor . "%' OR rescensioner LIKE '%" . $searchfor . "%' OR verkkommentar LIKE '%" . $searchfor . "%')";
$action = " AND ";
endif;
if($beskrivning <> ""):
$countquery .= $action . "beskrivning = '" . $beskrivning . "'";
$action = " AND ";
endif;
if($aerefter <> ""):
$countquery .= $action . "aer >= '" . $aerefter . "'";
$action = " AND ";
endif;
if($aerfore <> ""):
$countquery .= $action . "aer <= '" . $aerfore . "'";
$action = " AND ";
endif;
$countresult = mysql_db_query($database, $countquery);
$countrow = mysql_fetch_array($countresult);
$result = mysql_db_query($database, $query);
$numrows = intval($countrow[0]);

?>
</code>