-1
I have a problem in a form, I need when choosing a radio it change the link to where the information goes,that I could, but in the email is not getting the form information
Someone can help me?
Filing cabinet enviar.php
<!-- language: php -->
<?php
<?php
$ipaddress = $_SERVER['REMOTE_ADDR'];
$nome = $_POST['nome'];
$email = $_POST['email'];
$mobile = $_POST['mobile'];
$info = getdate();
$date = $info['mday'];
$month = $info['mon'];
$year = $info['year'];
$hour = $info['hours'];
$min = $info['minutes'];
$sec = $info['seconds'];
$current_date = "$date/$month/$year - $hour:$min:$sec";
$exibir_apos_enviar='mensagem-enviada.html';
mail("[email protected]","Orçamento Alopecia","Nome: $nome \n\n Email: $email \n\n Telefone: $mobile \n\n IP: $ipaddress \n\n Contato em: $current_date");
echo "<script>window.location='$exibir_apos_enviar'</script>";
?>
<script type="text/javascript">
jQuery(function($){
$('.gender').click(function(){
var volume = $(this).val();
if (volume == "alopecia") {
$('#form-action').attr('action', 'http://www.eternus.com.br/ebook-7-segredos-uso-protese-capilar/enviando-alopecia.php');
}
else if (volume == "calvice") {
$('#form-action').attr('action', 'http://www.eternus.com.br/ebook-7-segredos-uso-protese-capilar/enviando-calvice.php');
}
else if (volume == "quimio") {
$('#form-action').attr('action', 'http://www.eternus.com.br/ebook-7-segredos-uso-protese-capilar/enviando-quimio.php');
}
else if (volume == "outros") {
$('#form-action').attr('action', 'http://www.eternus.com.br/ebook-7-segredos-uso-protese-capilar/enviando-outros.php');
}
});
});
</script>
<form role="form" method="POST" action="#" id="form-action">
<div class="form-group">
<label>Nome Completo</label>
<input class="form-control input-lg" name="nome" id="nome" type="text" placeholder="Coloque Seu Nome Completo" required>
</div>
<div class="form-group">
<label>Email</label>
<input class="form-control input-lg" name="email" id="email" type="text" placeholder="Coloque seu email" required>
</div>
<div class="form-group">
<label>Celular/Whatsapp</label>
<input class="form-control input-lg" name="mobile" id="mobile" type="text" placeholder="Coloque o Numero do Whatsapp">
</div>
<br>
<label>Para Qual Solução Será usado o eBook?</label>
<br>
<input type="radio" name="gender" value="alopecia" class="gender">Alopecia<br>
<input type="radio" name="gender" value="calvice" class="gender"> Calvice<br>
<input type="radio" name="gender" value="quimio" class="gender"> Quimioterapia<br>
<input type="radio" name="gender" value="outros" class="gender"> Outros<br>
<br>
<div class="form-group last">
<input type="submit" class="btn btn-warning btn-block btn-lg" name="aderir" id="aderir" value="Enviar" >
</div>
<p class="re-assure">Nós Não Compartilhamos seu Email. Sem spam. </p>
</form>
Each radio will send the data of your form by
$_POST
to an archive.php
different, that’s it?– Tales Peres
that’s exactly what
– Vinicius Santos