Supongo que olvidaste el
ociexecute($stmt, OCI_DEFAULT);
Después de la
$stmt = OCIParse($connect, $query);
Y antes de:
while(OCIFetch($stmt))
Entonces se vería así:
//Perform search
$stmt = OCIParse($connect, $query);
// Execute statement
ociexecute($stmt, OCI_DEFAULT);
//And display the results
$counter = 0;
while(OCIFetch($stmt))
{
$counter++;
...