I have a login form that works like if user email password and 2 pic is correct then echo logged in but problem is my email is match password is match but how can i match images with single [select html tag]. here is my html form....
<select name="image" multiple="multiple">
<?php
for($i=0;$i<5;$i++)
echo"<option data-img-src=\"$pic[$i]\" value=\"$pic[$i]\" ></option>";
?>
</select>
And mysql query is here .......
$mysql=mysql_query("SELECT * FROM `table` WHERE `email`='$email' AND `password`='$pass' AND `image1`='$image' AND `image2`='$image'") or die(mysql_error());
if(mysql_num_rows($mysql) ==1){
$_SESSION['user']= $email;
header("location: home.php");
} else {
echo "error";
session_destroy();
}
If both images are match then he is successfully logged in otherwise not