如何在表单的同一行显示回显消息?
<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";
?>
谢谢