Ir para conteúdo
Fórum Script Brasil

motapaz

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que motapaz postou

  1. motapaz

    PHP gerando xml

    pessoal preciso gerar um arquivo xml atravês de um formulario tenho o seguinte codigo: o primeiro codigo manda em metodo post ao segundo que imprime na tela..Preciso que se gere um arquivo xml automaticamente com os campos modelo, cor, fabraicante e ano e junto a data atual..Tentei varios tutoriais mais não deu certo... <body> <form action="enviar.php" method="post" name="dados" onSubmit="return enviardados();" > <table width="588" border="0" align="center" > <tr></tr> <tr> <td width="118" bgcolor="#CCCCCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Marca:</strong></font></td> <td width="460" bgcolor="#CCCCCC"><input name="tx_nome" type="text" class="formbutton" id="tx_nome" size="52" maxlength="150" /></td> </tr> <tr> <td width="118" bgcolor="#CCCCCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Modelo:</strong></font></td> <td width="460" bgcolor="#CCCCCC"><input name="tx_modelo" type="text" class="formbutton" id="tx_modelo" size="52" maxlength="150" /></td> </tr> <tr> <td width="118" bgcolor="#CCCCCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Combustivel:</strong></font></td> <td width="460" bgcolor="#CCCCCC"><input name="tx_combustivel" type="text" class="formbutton" id="tx_combustivel" size="52" maxlength="150" /></td> </tr> <tr> <td width="118" bgcolor="#CCCCCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Cor:</strong></font></td> <td width="460" bgcolor="#CCCCCC"><input name="tx_cor" type="text" class="formbutton" id="tx_cor" size="52" maxlength="150" /></td> </tr> <tr> <td width="118" bgcolor="#CCCCCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Ano:</strong></font></td> <td width="460" bgcolor="#CCCCCC"><input name="tx_ano" type="text" class="formbutton" id="tx_ano" size="52" maxlength="150" /></td> </tr> <tr> <td height="22" bgcolor="#CCCCCC"> </td> <td bgcolor="#CCCCCC"><input name="Submit" type="submit" class="formobjects" value="Enviar dados" /> <input name="Reset" type="reset" class="formobjects" value="Redefinir" /></td> </tr> </table> </form> </body> </html> em php tenho o seguinte: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body> <h3>Cadastro de Automóveis:</h3> Modelo: <?php echo $_POST["tx_modelo"]; ?>.<br/> Cor: <?php echo $_POST["tx_cor"]; ?>.<br/> Fabricante: <?php echo $_POST["tx_nome"]; ?>.<br/> Ano: <?php echo $_POST["tx_ano"]; ?>.<br/> </body> </html> Preciso que se gere um arquivo xml automaticamente com os campos modelo, cor, fabraicante e ano e junto a data atual..Tentei varios tutoriais mais não deu certo... agradeço desde já a atença de todos!!!
×
×
  • Criar Novo...