Creo que se acercan a esto desde el ángulo incorrecto...En lugar de enviar el formulario y crear un vínculo con los valores de correos, y no basta con incluir los archivos correctos...Así, en otras palabras, crear solution_1.html a los archivos solution_10.html y sólo si es necesario incluirlos...de este modo:
form.html
<form action="checkbox-control.php" method="post">
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
<input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
<input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
<input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
<input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
<input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
<input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
<input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
<input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
<input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
<br /> If your problem is not listed here then please let me know so.<br />
</form>
- <form action="checkbox-control.php" method="post">
- Please, check all the boxes that applies to your current sitiation:<br /><br />
- <input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
- <input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
- <input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
- <input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
- <input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
- <input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
- <input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
- <input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
- <input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
- <input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
- <center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
- <br /> If your problem is not listed here then please let me know so.<br />
- </form>
casilla de control. php
<?php
for($i=0;$i<11;$i++){
if(isset($_POST['problem'][$i]) && !empty($_POST['problem'][$i])){
include("includes/solution_$i.html");
}
}
?>
- <?php
- for($i=0;$i<11;$i++){
- if(isset($_POST['problem'][$i]) && !empty($_POST['problem'][$i])){
- include("includes/solution_$i.html");
- }
- }
- ?>