Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 10th, 2007, 6:16 PM   #1
Kelvoron
Programmer
 
Kelvoron's Avatar
 
Join Date: Aug 2007
Location: Ohio
Posts: 46
Rep Power: 0 Kelvoron is on a distinguished road
Unhappy Method Post not allowd?

Hey guys i was doing some PHP, i am still rather new to it, and i was making a form i wanted it to take a name the user puts in a basic HTML form and out put it (just the first small step to a user name and pass word form). I coded it up what i thought was corectly and ran it i used the method post in the form, when i hit submit it brings up an error

Quote:
Method Not Allowed
The requested method POST is not allowed for the URL /CIS/blarg.HTML.


--------------------------------------------------------------------------------

Apache/1.3.37 Server at moronsplayingwithfire.net Port 80
This was on the host that i am renting space from. I then remembered that my first day trying out PHP i had made a user name and password form on a free host. So i looked up my old code and tested it. It worked so i copy pasted the code into a new web page on the host i am paying for and tested it. I recived the same error. With the code beeing exacly the same i know that is not the problem. Has anyone seen anything like this before? Is there a way to fix it?

by the way i use hostgator.com

Edit: I tried using Get rather then post and it din't give me the error but it did not do anything eaither just sat there

Thanks in advanced
~Kelvoron
__________________
Good better best, never let it rest, untill your good is better and your better is the best.
Kelvoron is offline   Reply With Quote
Old Sep 10th, 2007, 6:25 PM   #2
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4 Wizard1988 is on a distinguished road
Posting your .php file would be helpfull.
__________________

Wizard1988 is offline   Reply With Quote
Old Sep 10th, 2007, 9:00 PM   #3
MiKuS
Hobbyist Programmer
 
Join Date: Jun 2007
Posts: 136
Rep Power: 2 MiKuS is on a distinguished road
check the form action, be sure it's pointing to a php file..
<form action="file.php" method="post" name="formName">

Last edited by MiKuS; Sep 10th, 2007 at 9:16 PM.
MiKuS is offline   Reply With Quote
Old Sep 10th, 2007, 9:09 PM   #4
Kelvoron
Programmer
 
Kelvoron's Avatar
 
Join Date: Aug 2007
Location: Ohio
Posts: 46
Rep Power: 0 Kelvoron is on a distinguished road
Ok thanks. I have the PHP running inside of the acual HTML page it had worked with the free host so i figured it was ok. I will make a PHP driver when i am done working on the police departments Explorer website, and post weather it worked. thanks.
__________________
Good better best, never let it rest, untill your good is better and your better is the best.
Kelvoron is offline   Reply With Quote
Old Dec 14th, 2007, 3:40 AM   #5
kishou
Programmer
 
Join Date: May 2007
Posts: 52
Rep Power: 2 kishou is on a distinguished road
Re: Method Post not allowd?

did you double check everything? also if you did and you still get your error it mght be that your hoster doesnt support PHP 4 or 5.
kishou is offline   Reply With Quote
Old Dec 19th, 2007, 7:04 AM   #6
lynxus
Newbie
 
Join Date: Dec 2007
Posts: 4
Rep Power: 0 lynxus is on a distinguished road
Re: Method Post not allowd?

The way i do things like this is to have a html file and a php file , not using php in the html file.

So in a html file you would do summat like

<form action="script.php" method="post" name="Moooo">
<input name="username" type="text"/> Username
</form>

Then in the php.

$username = $_POST['username'];

echo $username;

Sometimes i liek to use the STRreplace just to clean the username of odd chars.

$username = str_replace (" ", "_", $username);



Hope this helps in any way
lynxus is offline   Reply With Quote
Old Dec 26th, 2007, 11:32 AM   #7
null_ptr0
12 years old
 
Join Date: Nov 2007
Posts: 105
Rep Power: 0 null_ptr0 is an unknown quantity at this point
Re: Method Post not allowd?

Perhaps your host blocked it.
null_ptr0 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP Status 405 - HTTP method POST is not supported by this URL hemanth.balaji Java 5 Mar 21st, 2006 3:48 AM
Median/Mode in arrays? {Need help} Java|Tera Java 27 Nov 29th, 2005 11:50 AM
How to post a question nnxion C++ 10 Jun 3rd, 2005 12:53 PM
How to post a question nnxion C++ 0 Jun 3rd, 2005 9:55 AM
How to post a question nnxion C 0 Jun 3rd, 2005 9:55 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:04 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC