Hmm. Perhaps you're used to a different coding construct, but in PHP, the entire IF statement needs to be enclosed inside parenthesis (sp?), like so:
if(strlen($surveyid) !=6 || substr($surveyid,0,1) != 'S' || substr($surveyid,0,1) != 'I' || strlen($firstname) < 1 || strlen($lastname) < 1) {
require('regerror.inc');
}
else
{
include('next.inc');
}
NOTE: I also converted the 'or' keyword to the logical operator '||', simply because I always use those operators (||, &&, etc.). I believe they are both compatible, not 100% sure though. At any rate, feel free to use what you prefer. More about those operators here if anyone's interested.