Jump to content

multiple checkboxes


dean012

Recommended Posts

ok so i am trying to do multiple checkboxes that will directed to their own page with a single submit but not working

<form action ="trip1.php" method="post" name="form1">
<p><input type="checkbox" name="agree" /> Auckland</p>
</form>
<form action ="trip.php" method="post" name="form2">
<p><input type="checkbox" name="agree" /> North Shore</p>
<p><input type="checkbox" name="agree" /> Waikato</p>
<p><input type="checkbox" name="agree" /> Taranaki</p>
<p><input type="checkbox" name="agree" /> Toupo</p>
<p><input type="checkbox" name="agree" /> Wellington/p>
<p><input type="checkbox" name="agree" /> Bay of Plenty</p>
<p><input type="checkbox" name="agree" /> Manukau</p>
<p><input type="submit" value="submit" onclick="form2.submit();"/></p>
</div>
</form
Link to comment
https://forums.phpfreaks.com/topic/282903-multiple-checkboxes/
Share on other sites

yea but no one replying on that thread and i tried already

<form action ="taupo.php" method="post" name="form1">
<p><input type="checkbox" name='agree[]' /> Auckland</p>
</form>
<form action ="hamilton.php" method="post" name="form2">
<p><input type="checkbox" name='agree[]' /> North Shore</p>
</form>
	<p><input type="checkbox" name='agree[]' /> Waikato</p>
	<p><input type="checkbox" name="agree[]" /> Taranaki</p>
	<p><input type="checkbox" name="agree[]" /> Taupo</p>
	<p><input type="checkbox" name="agree[]" /> Wellington/p>
	<p><input type="checkbox" name="agree[]" /> Bay of Plenty</p>
	<p><input type="checkbox" name="agree[]" /> Manukau</p>
	<p><input type="submit" value="submit" onclick="form2.submit();"/></p>
		
    </div>

</form>
Link to comment
https://forums.phpfreaks.com/topic/282903-multiple-checkboxes/#findComment-1453636
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.