Processing Forms
Posted: Mon May 29, 2006 3:49 am
Hello.
I'm triyng to process the fields of a form i've created, but i don't know how to process the fields.
Here is my form code:
<form action="iprodutos_.php" method="POST">
Nome: <!--webbot bot="Validation" B-Value-Required="TRUE" --><input type="text" name="nome"><br><br>
Descrição: <textarea rows="3" name="descricao" cols="26"></textarea><br><br>
Categoria:<!--webbot bot="Validation" B-Value-Required="TRUE" B-Disallow-First-Item="TRUE" -->
<select size="1" name="categoria">
<option selected value="0">Seleccione ..</option>
<option value="1">Colares</option>
<option value="2">Brincos</option>
<option value="3">Porta-Chaves</option>
<option value="4">Pulseiras</option>
<option value="5">Pinturas em Tecidos</option>
<option value="6">Pinturas em Vidro e Gesso</option>
<option value="7">Quadros</option>
</select><br><br>
Preço:<!--webbot bot="Validation" S-Data-Type="Number" S-Number-Separators="x," --><input type="text" name="preco" size="20"><br><br>
Imagem: <input type="file" name="imagem" size="40"><br><br>
<input type="submit" value="Submeter" name="enviar"><input type="reset" value="Repor" name="limpar">
</form>
Someone have told me that the way i've made my form the data will be stored in $_POST and the data form last field it will be in $_FILES
But how do i work with this variables? Because when i click on the submit button i don't get nothing in the file iprodutos_.php!!!
What code do i need to put in the iprodutos_.php to received the information of the diferent fields that i have?
I need to create a variable like: $_POST = $_GET['_POST'];? or how do i do?
With the best regards
Hugo Gomes
I'm triyng to process the fields of a form i've created, but i don't know how to process the fields.
Here is my form code:
<form action="iprodutos_.php" method="POST">
Nome: <!--webbot bot="Validation" B-Value-Required="TRUE" --><input type="text" name="nome"><br><br>
Descrição: <textarea rows="3" name="descricao" cols="26"></textarea><br><br>
Categoria:<!--webbot bot="Validation" B-Value-Required="TRUE" B-Disallow-First-Item="TRUE" -->
<select size="1" name="categoria">
<option selected value="0">Seleccione ..</option>
<option value="1">Colares</option>
<option value="2">Brincos</option>
<option value="3">Porta-Chaves</option>
<option value="4">Pulseiras</option>
<option value="5">Pinturas em Tecidos</option>
<option value="6">Pinturas em Vidro e Gesso</option>
<option value="7">Quadros</option>
</select><br><br>
Preço:<!--webbot bot="Validation" S-Data-Type="Number" S-Number-Separators="x," --><input type="text" name="preco" size="20"><br><br>
Imagem: <input type="file" name="imagem" size="40"><br><br>
<input type="submit" value="Submeter" name="enviar"><input type="reset" value="Repor" name="limpar">
</form>
Someone have told me that the way i've made my form the data will be stored in $_POST and the data form last field it will be in $_FILES
But how do i work with this variables? Because when i click on the submit button i don't get nothing in the file iprodutos_.php!!!
What code do i need to put in the iprodutos_.php to received the information of the diferent fields that i have?
I need to create a variable like: $_POST = $_GET['_POST'];? or how do i do?
With the best regards
Hugo Gomes