0
Hello, I’m making an upload system, but when I give Submit in the following code both exchange the value of the variable ID.
My idea is to change the ID value so that the folder that will be uploaded will change, as can be seen in the 1st echo, while in the 2nd echo shows the upload button itself.
I want only the 1st echo to change the ID value when I use Submit.
echo "<form action='' method='POST' enctype='multipart/form-data'>
<input type='text' name='ID' id='ID' placeholder='INSIRA O ID'>
<input type='submit' value='confirmar' id='ID'>";
$ID = $_POST['ID'];
echo "<form action='' method='POST' enctype='multipart/form-data'>
<input type='file' name='allfiles' />
<input type='submit'/>
</form>";
I don’t understand why you have two
form
and only one of them is closed. You can explain ?– Leandro Lima
because they were together previously, but this does not interfere in this case for what I tested.
– Welington z
I tested your code here, and it’s working normal. Or I didn’t quite understand your question. I fill in for example '12' in the form, and that’s what var
$ID
received, not exchanged for another value.– Leandro Lima
yes 12 is successfully received, but after entering 12 and using the send button of the other form that in the case of upload it changes the ID value again which was not supposed to happen.
– Welington z
You tried to give the attribute
name
different for each form of this?– Leonardo Pessoa
yes, I just tried to replace Submit with the button and it didn’t work either.
– Welington z