2013-03-08 36 views
0

如何在窗體的同一行顯示回顯信息?在表格的同一行上顯示回顯信息

Live version

<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"; 

?> 

謝謝

+0

這是HTML相關問題只是,它與PHP或者什麼都沒有關係回聲。你必須使用HTML格式化你的頁面,echo不能格式化它們。 – 2013-03-08 11:53:52

回答

1

只要把CSS display:inline屬性窗體上:

<form style="display:inline-block;"> 

或者把你的PHP到你的<form>