Marina_Eq
New Coder
Hello, new here, english is not my native lenguage but i'm gona try to explain what I need to learn. Sorry in advance, I'm learning on my own and may make a lot of mistakes
The problem is this: I have 3 documents:
- Form.php -> here is the form (first photo)
<form action="index.php?seccion=print" method="POST" enctype="multipart/form-data">
<select name="item" id="item">
<?php
include_once 'item.php';
foreach ($options as $value => $option) :
echo "<option value=\"$value\">$option</option>";
endforeach;
?>
</select>
- Item.php -> here are the select options inside an array that I linked to the other 2 .php documents
<?php
$options = [
'H' => 'option 1',
'O' => 'option 2',
'E' => 'option 3',
];
?>
- Print.php -> I want the results to print her
<?php
include_once 'item.php';
<!!!!---don't know what code to put here ---!>
?>
I want the option(item) selected in document form.php to be printed in print.php, but i only get the string and the array position printed when I tried different things.
Am I explaining myself? Can anyone help me?
Thanks in advance,
hope I have not broken any rules of the forum.
The problem is this: I have 3 documents:
- Form.php -> here is the form (first photo)
<form action="index.php?seccion=print" method="POST" enctype="multipart/form-data">
<select name="item" id="item">
<?php
include_once 'item.php';
foreach ($options as $value => $option) :
echo "<option value=\"$value\">$option</option>";
endforeach;
?>
</select>
- Item.php -> here are the select options inside an array that I linked to the other 2 .php documents
<?php
$options = [
'H' => 'option 1',
'O' => 'option 2',
'E' => 'option 3',
];
?>
- Print.php -> I want the results to print her
<?php
include_once 'item.php';
<!!!!---don't know what code to put here ---!>
?>
I want the option(item) selected in document form.php to be printed in print.php, but i only get the string and the array position printed when I tried different things.
Am I explaining myself? Can anyone help me?
Thanks in advance,
hope I have not broken any rules of the forum.