[Resolvido] Onde está o conteudo do botão de rádio?
Pessoal, sou novíssimo em PHP e MySQL, portanto desculpem se o errinho for básico.
HTML - informação capturada no formulário
<label for="fangspotted">Have you seen my dog Fang?</label>
<input type="radio" id="fangspotted" name="fangspotted" value="yes" />Yes
<input type="radio" id="fangspotted" name="fangspotted" value="no" />No
PHP - conteído capturado pelo programa chamado
$fang_spotted = $_POST['fangspotted'];
EXIBIÇÃO DO VARIÁVEL DE CONSULTA (INSTRUÇÃO SQL)
insert into aliens_abduction(first_name, last_name, when_it_happened, how_long, how_many, alien_description, what_they_did, fang_spotted, other, email)values('Steefen', 'Fry', 'last January', '6 or 8 hours', '7 or 8', 'little green man', 'asked me about Brazil', '','none', 'teste@teste.com')
EXIBIÇÃO DAS VARIAVEIS $_POST
Thanks for submitting the form.
You were abducted last January for 6 or 8 hours
Number of aliens: 7 or 8
Describe them: little green man
The aliens did this: asked me about Brazil
Was Fang there? yes
Other comments: none
Your email address is teste@gmail.com
PROBLEMA
Observem a palavra yes à pergunta Was Fang there?... Agora observem a instrução SQL: por que o valor 'yes', no caso, não está presente na variável?
Discussão (8)
Carregando comentários...