English 中文(简体)
将该表格数据下载至XML
原标题:Download this form data to XML
  • 时间:2012-04-10 09:41:00
  •  标签:
  • php
  • xml
  • forms

a. 具有某些数据的简单形式,例如:

  • 姓名

  • 地点

  • 价格

表格的网页将装上具体链接:我的网站.it/data2xml.php或我的网站.it/data2xml.xml。

Edit: The here s form page:

<form method=post action="download.php">  
First name: <input type="text" name="firstname" />  
<br />  
Last name: <input type="text" name="lastname" />  
<br /> 
<input type="submit" name="submit"> 
</form>

页: 1

最佳回答

引证:

<!-- form.html -->
<form method=post action="download.php">  
First name: <input type="text" name="firstname" />  
<br />  
Last name: <input type="text" name="lastname" />  
<br />
<input type="submit" name="submit"> 
</form>

因此,你需要做一些事情来制定《公约》。

<?php
// download.php

$firstname = $_POST[ firstname ];
$lastname = $_POST[ lastname ];

echo "
<?xml version="1.0" encoding="UTF-8"?>
<root>
    <firstname>{$firstname}</firstname>
    <lastname>{$lastname}</lastname>
</root>
";

这是All basic——阁下不妨检查职位要素的价值。 而且,你不需要你的第二个<代码><form>,只要我能说的话。 我建议做一些关于购买力平价的辅导,并读到一本书——在不进行一些坚固、自我引导的研究的情况下,你只能学习这么多。

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签