【发布时间】:2013-02-23 23:03:00
【问题描述】:
如何在表单的同一行显示回显消息?
<form name="form1" method="post" action="">Correo: <input type="text" name="mail"><input type="submit" name="Suscribir" value="Suscribir"></form>
<?php
$email = $_POST['mail'];
//the data
$data = "$email\n";
//open the file and choose the mode
$fh = fopen("users.txt", "a");
fwrite($fh, $data);
//close the file
fclose($fh);
if (count($_POST)>0) echo "Suscripcion dado de alta";
?>
谢谢
【问题讨论】:
-
这只是HTML相关的问题,它与PHP或echo无关。您必须使用 HTML 来格式化您的页面,echo 无法格式化它们。