Jump to content

[SOLVED] check variable against 5 values


refiking

Recommended Posts

I need to check the $check variable against 5 values.  Is there a way to do this other than 5 if statements?  Here's what I'm after:

 

<?
$check = $_POST['winbot'];
//IF winbot = "yellow", "purple", "winbot", "calendar", "circle"
//proceed
ELSE{
'Please review your response';
header("Location: index.php");
exit;
}
?>

Link to comment
https://forums.phpfreaks.com/topic/134080-solved-check-variable-against-5-values/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.