so basically lets say I have a page called page-with-links.php:
<ul>
<li><a href="page-with-checkboxes.php" name="blue">Blue</a></li>
<li><a href="page-with-checkboxes.php" name="red">Red</a></li>
<li><a href="page-with-checkboxes.php" name="green">Green</a></li>
<li><a href="page-with-checkboxes.php" name="yellow">Yellow</a></li>
<li><a href="page-with-checkboxes.php" name="orange">Orange</a></li>
</ul>
and a page called page-with-checkboxes.php:
<h3>You selected:</h3>
<form>
<input type="checkbox" name="blue" />
<label for="blue"> Blue</label><br>
input type="checkbox" name="red" />
<label for="red"> Red</label><br>
input type="checkbox" name="green" />
<label for="green"> Green</label><br>
<input type="checkbox" name="yellow" />
<label for="yellow"> Yellow</label><br>
<input type="checkbox" name="orange" />
<label for="orange"> Orange</label><br>
</form>
I would like to be able to use the name value of the <a>
tag to check the related box on the next page.
For example, if the user clicks 'green' on page-with-links.php, I would like the checkbox with name="green"
to be checked when page-with-checkboxes.php loads.
I hope I've been clear enough. Thanks in advance to anyone who can help!