2012-10-12 84 views
1

我想創建一個表單,但按鈕Submit和Reset不顯示爲按鈕;相反,它們顯示爲帶有字段中的提交和重置字樣的字段。我搜索了四周,無法找到答案。我對錶單和PHP非常陌生,所以請爲初學者說話。表單提交按鈕作爲字段

此外,如果它是相關的,請知道我設計這個功能從我的桌面(儘管我已經安裝了PHP),目標是將表單發佈到文件,而不是MySQL數據庫。

這裏是我的代碼:

<form method=」post」 action=」"> 

<table width=」400? border=」0? align=」center」 cellpadding=」2? cellspacing=」2?> 
<tr> 
<td>Username: </td> 
<td><input type=」text」 name=」username」></td> 
</tr> 
<tr> 
<td>Passwd: </td> 
<td><input type=」password」 name=」passwd」></td> 
</tr> 
<tr> 
<td>&nbsp;</td> 
<td><input type=」submit」 value=」Submit」>&nbsp;&nbsp; <input type=」reset」 name=」reset」 value=」Reset」> 
</td> 
</tr> 
</table> 
</form> 

這是在行動:http://masterysoftware.net/The%20OPP/index.html

+0

PHP是不相關的這個問題。 PHP是服務器端,頁面佈局僅依賴於HTML和其他客戶端技術。 – Barmar

回答

1

解決您的報價。你有問號應該有報價和一些怪異的報價。我猜問題的部分問題源於你的PHP代碼,這似乎沒有任何問題。

嘗試:

<form method="post" action=""> 
<table width="400" border="0" align="center" cellpadding="2" cellspacing="2"> 
<tr> 
<td>Username: </td> 
<td><input type="text" name="username"></td> 
</tr> 
<tr> 
<td>Passwd: </td> 
<td><input type="password" name="passwd"></td> 
</tr> 
<tr> 
<td>&nbsp;</td> 
<td><input type="submit" value="Submit">&nbsp;&nbsp; <input type="reset" name="reset" value="Reset"> 
</td> 
</tr> 
</table> 
</form> 
+0

很酷!非常感謝! – user1727864

+0

HTML使用直引號與Microsoft Word類程序更改直引號以符合編寫樣式與編碼規則的傾斜引號 –