HTTP 405 - Resource not allowed error
| From: | Sudheer Palaparambil | Date: | Tue, 21 Oct 2003 12:52:26 +0000 |
| Subject: | HTTP 405 - Resource not allowed error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-166948@lists.php.net to get a copy of this message | ||
Hi,
<form method="post" name="form" action="insert_user.php" onsubmit="return verifyIt(this);">
This file and the index.php are kept in the same directory. But the
browser returns
I tried GET also, but not inserting the data to mysql db.
This is my insert_user.php
*---------------------------------
<html>
<body>
<?
$sFName = AddSlashes( $_POST['first_name'] );
$sLName = AddSlashes( $_POST['last_name'] );
$sEMail = AddSlashes( $_POST['e_mail'] );
mysql_connect( "localhost", "dbuser", "dbpwd" ) or die( "Failure" );
mysql_select_db( "users" );
$query = "INSERT INTO users( fname, lname, email, comments )
VALUES ( '$sFName', '$sLName', '$sEMail', '$sComments' )";$result = mysql_query( $query ) or die ( "Unable to insert user.." ); mysql_close( "users" ); header( "Location:index.php" ); ?> </body> </html> *------------------------------------------------------------ Thank you. Sudheer _________________________________________________________________ He's the fastest Indian.He's Narain Karthikeyan. http://server1.msn.co.in/sp03/tataracing/index.asp Will he make it to F1?