so... I have a form in a html page who, in submit, will call teste1.php who will add the form fieds to a mysql db. The problem is the form never submit. I have two forms on this page (yes, I need both), but I don't think thats the problem.
Ok, so, this is my form:
<div id="apresentacao">
<form method="post" action="teste1.php" id="form" style="display:none">
<div>
<label for="nome">Nome:</label>
<input class="form-control" placeholder="Não obrigatório" autofocus="autofocus" type="text" name="nome" id="nome" />
</div>
<div>
<label for="email">* Email:</label>
<input class="form-control" pattern="^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$" placeholder="Ex: nome@gmail.com" type="email" name="email" id="email" />
</div>
<div>
<label for="enderecoform">Endereço:</label>
<input type="text" id="enderecoform" name="enderecoform" />
</div>
<div>
<label for="latitude">Latitude</label>
<input type="text" id="txtLatitude" name="txtLatitude" class="form-control" />
</div>
<div>
<label for="longitude">Longitude</label>
<input type="text" id="txtLongitude" name="txtLongitude" class="form-control" />
</div>
<div>
<label for="data">Data:</label>
<input class="form-control" type="text" name="" id="data" />
</div>
<div>
<label for="crime">Crime:</label>
<select name="sexo" id="sexo" class="form-control" >
<option class="form-control" value="">Selecione...</option>
<option class="form-control" value="Assalto">Assalto</option>
<option class="form-control" value="Agressao1">Agressão física</option>
<option class="form-control" value="Agressao2">Agressão verbal</option>
<option class="form-control" value="Estupro">Estupro</option>
<option class="form-control" value="Invasão">Invasão à domicílio</option>
<option class="form-control" value="Latrocinio">Latrocínio</option>
<option class="form-control" value="Homicídio">Homicídio</option>
<option class="form-control" value="Furto">Furto</option>
<option class="form-control" value="Outros">Outros</option>
</select>
</div>
<div>
<label for="textarea">Descrição:</label>
<textarea maxlength = "150" cols="50" rows="2" class="form-control">
</textarea>
</div>
<br />
<div>
<input type="reset" id="limpar" class="btn btn-info" name="limpar" value="Limpar" />
</div>
<div>
<input type="submit" id="inserir" class="btn btn-success" name="inserir" value="Cadastrar" />
</div>
</form>
</div>
And this is my php file:
<?php
$endereco = $_REQUEST['enderecoform'];
$latitude = $_REQUEST['txtLatitude'] ;
$longitude = $_REQUEST['txtLongitude'];
//inserir(array("latitude","longitude"), array("1","1"), "crimes");
echo "$endereco";
echo "$latitude";
echo "$longitude";
?>
EDIT
When I click in the submit button, nothing happens, it just stays on the same page, like that button had no action at all. Also, the form is set to "hidden" cause at first, i didn't want to show it, but there are two buttons on the page, one wich sets it to "block" and the other to "hidden", so the user decide's it.