HTML/PHP:
<form method="post" name="contact" id="frmContact" action="sM.php">
<img id="main-img" src="theimage/img1.png" name="imageval" />
<div style="clear: both; padding: 10px 0 0 0; overflow: hidden;">
Please enter the number(s) from the image above: <input type="text" id="tNum" placeholder="Enter Number(s)" name="numval" />
</div>
<input type="submit" value="Send" id="submit" name="submit" class="submit_btn" />
</form>
PHP:
$arrImg = array("img1", "img2", "img3", "img4", "img5", "img6");
$arrImgText = array("56", "342", "34534", "12", "444", "652");
$imgval = trim(strip_tags(stripslashes($_POST['imageval']))); //get the image source that was displayed in the form
$numval = trim(strip_tags(stripslashes($_POST['numval']))); //get the number that the user entered
//if ({arrImg[imgval] == arrImgText[numval]}) {
//do something;
//}
The image that is displayed in the form has some numbers. When the user hit send, I would like to compare the number that was entered that was displayed in the image and compare.
How can I do that.