So I am creating a new website that allows users to click on an image and submit a form. I am using ajax so the individual doesn't have to load different page. However, I am in a small hiccup that whenever the individual hits the image and tries to submit the form, the form doesn't go through as the Ajax is blocking it. Pleae see the following:
<div id="message">Click below to start searching.</div> <br>
<a href='javascript:void(0);' onClick="load('content', 'm_jax.php?id=2&do=search');"><img src='map1.png' style='border: 1px solid black;' /></a>
if (isset($_POST['submit'])){
echo hello;
}
$input = array("1", "10", "13", "123", "163","540","624");
$nb_value = 1;
srand ((float) microtime() * 10000000);
$random_id_length = 20;
$rnd_id = crypt(uniqid(rand(),1));
$rnd_id = strip_tags(stripslashes($rnd_id));
$rnd_id = str_replace(".","",$rnd_id);
$rnd_id = strrev(str_replace("/","",$rnd_id));
$rnd_id = substr($rnd_id,0,$random_id_length);
$rand_keys = array_rand($input, $nb_value);
$rand1=$input[$rand_keys];
$rand= mysql_query("Select * from items where id='$rand1'");
$rand1=mysql_fetch_array($rand);
?>
<b>You have found an <?php echo $rand1[item];?></b>
<br><br>
<img src="<?php echo $rand1[id];?>.png">
<form action='' method='post'>
<input type='hidden' name='value' value='12' />
<input type='hidden' name='code' value='$rnd_id ' />
<input type='submit' name='enter' value='Catch Item!'/>
</form>
<?php
}
?>