2012-11-17 23 views
2

我試圖將表單發佈到mysql數據庫中。我正在使用Windows 8和iis 8,但是當我嘗試發佈表單時,出現此錯誤「您正在查找的頁面無法顯示,因爲正在使用無效方法(HTTP動詞)。」HTTP錯誤405.0 - 方法不允許當我嘗試將表單發佈到數據庫中

我的html代碼:

<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <title>odev3</title> 
</head> 
<body> 
<form align="middle" action="insert.php" method="post"> 
Ad : <input type="text" name="ad" style="margin-left:60px" required/><br> 
Soyad : <input type="text" name="soyad" style="margin-left:40px" required/><br> 
Kullanıcı Adı : <input type="text" name="kullaniciadi" required/><br> 
Şifre : <input type="text" name="sifre" style="margin-left:52px" required/><br> 
<input type="reset" value="Temizle"/> 
<input type="submit" value="Kaydol"/> 
</form> 
</body> 
</html> 

和我的PHP代碼:

<?php 
    $host="localhost"; 
    $user="root"; 
    $pass="123"; 

    mysql_connect($host,$user,$pass); 

    mysql_select_db("odev3"); 

    $sql="INSERT INTO kisi(ad,soyad,kullaniciadi,sifre) VALUES ('$_POST[ad]','$_POST[soyad]','$_POST[kullaniciadi]','$_POST[sifre]')"; 

    $result = mysql_query($sql); 
    if($result) 
    { 
     echo("<br> Veri eklendi."); 
    } 
    else 
    { 
     echo("<br> Veri eklenemedi."); 
    } 
?> 
+0

請問,當你將它張貼說的?那你的網址是什麼?在這裏發佈錯誤的網址 – samayo

+0

是的,首先我看到表單並填寫它。當我點擊提交按鈕,然後我得到的錯誤和此網址:http:// localhost:19853/insert.php – Miral

+0

檢查我的答案。 – samayo

回答

相關問題