0
I’m venturing a little with PHP, and I came across the following situation.
<div class="form-group">
<label for="recipient-name" class="control label">Tipo: </label>
<select name="teste" class="form-control">
<option value=""></option>
<option value="1">Valor 1</option>
<option value="2">Valor 2</option>
</select>
</div>
Is there any way to get that value I’m assigning to select, and assign a variable in that way:
<?php $a = $_POST["teste"];?>
And use this variable $a
elsewhere?
Hello, welcome to Sopt! You tried to do this by yourself?
– Breno
Yes, I’m just venturing a little bit with php to see how far it goes... and I came across this. it is possible to do, or there is something different in php q do it?
– Diego Oliveira
or there just happens to be some other way of doing it for another language?
– Diego Oliveira
or if you don’t have, you just happen to be able to restrict questions from another select depending on that one?
– Diego Oliveira
You are saying 'save' this variable for later access?
– Breno
Of course: session, cookie, asynchronous requests, cache. Here it seemed to me that you want to manipulate the form before sending. If that’s the case, you need to
Javascript
.– ShutUpMagda
Yes, in the case... what I look for in specific javascript?
– Diego Oliveira