PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am interested in making a page where it has a text box and a Submit button. And if the ext that is entered is correct, it redirects to another page. If it is wrong, it redirects to an error page.
if(!empty($question))
{
$validMatches = array();
$validMatches[] = 'devsdancin';
$validMatches[] = 'ladybug070';
foreach($validMatches as $validMatch)
{
if(strcasecmp($validMatch,$question)==0)
{//found a match
header("Location: http://...");
}
}
//didn't find a match from the list
header("Location: http://...");
}
//$question wasn't set or was an empty condition.