// maybe you're looking for these...
// both are using the regular expression
/***
this one will load either bad.php or good.php when the $word is found within $sentance
***/
/********** somename.php **********/
<?php
$sentance = "the computer is on";
$word = "computer";
if( ereg( $word, $sentance ) && ereg( "computer", $sentance ) ){
print header( "location: bad.php" );
}
else{
print header( "location: good.php" );
}
?>
/********** end somename.php **********/
/***
this one will print either
1) $sentance contains $word.
2) $sentance does not contain $word!
***/
/********** some-other-name.php **********/
<html>
<head>
<title>Does $sentance contain $word/"computer"?</title>
</head>
<body>
<?php
$sentance = "the computer is on";
$word = "computer";
if( ereg( $word, $sentance ) && ereg( "computer", $sentance ) ){
print( "<p>'$sentance' contains <strong>$word</strong>.</p>\n" );
}
else{
print( "<p>'$sentance' does not contain <strong>$word</strong>!</p>\n" );
}
?>
</body>
</html>
/********** end some-other-name.php **********/
/*****
i hope the $sentence you typed in your post was a typo
that means $sentence was actually $sentance

if it wasn't, then you have to give it in a little bit details
*****/