![]() |
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:
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 |
Posting your .php file would be helpfull.
|
check the form action, be sure it's pointing to a php file..
<form action="file.php" method="post" name="formName"> |
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.
|
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.
|
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 :) |
Re: Method Post not allowd?
Perhaps your host blocked it.
|
| All times are GMT -5. The time now is 12:57 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC