2024-09-26 09:50:18 +00:00
|
|
|
<?php
|
|
|
|
|
2024-09-29 06:53:01 +00:00
|
|
|
$valid_input = $_SESSION["valid_input"];
|
2024-09-26 09:50:18 +00:00
|
|
|
|
|
|
|
if (isset($_POST['input_char'])){
|
|
|
|
$locations = array();
|
|
|
|
for ($i=0; $i < strlen($valid_input); $i++) {
|
2024-09-29 06:53:01 +00:00
|
|
|
if ($_POST['input_char'] == $valid_input[$i]){
|
2024-09-26 09:50:18 +00:00
|
|
|
array_push($locations, $i);
|
|
|
|
}
|
|
|
|
}
|
2024-09-29 06:53:01 +00:00
|
|
|
$_SESSION["locations"] = $locations;
|
|
|
|
|
|
|
|
foreach ($_SESSION["locations"] as $key => $value) {
|
|
|
|
echo "<p>".$_POST['input_char'].": $value </p>";
|
|
|
|
}
|
|
|
|
}
|
2024-09-26 09:50:18 +00:00
|
|
|
|