Jump to content

HTTP Error 405.0 - Method Not Allowed


dorfhima

Recommended Posts

I am getting this error everytime i use my php form

HTTP Error 405.0 - Method Not Allowed

 

PHP CODE:

<?php
//if "email" variable is filled out, send email
  if (isset($_REQUEST['email']))  {
  
  //Email information
  $admin_email = "someone@example.com";
  $email = $_REQUEST['email'];
  $subject = $_REQUEST['subject'];
  $comment = $_REQUEST['comment'];
  
  //send email
  mail($admin_email, "$subject", $comment, "From:" . $email);
  
  //Email response
  echo "Thank you for contacting us!";
  }
  
  //if "email" variable is not filled out, display the form
  else  {
?>

<?php
  }
?>
Link to comment
Share on other sites

Unless you're planning to run IIS on your production server as well, I suggest you get rid of it and install a more common webserver, namely Apache. For Apache, there are complete development packages like XAMPP which are preconfigured and already include all relevant software (PHP, MySQL, phpmyadmin, ...).

 

IIS is exotic. You won't get a lot of help for it outside of specialized Microsoft forums, and you might actually have to do your own research (that's scary, I know).

Edited by Jacques1
  • Like 1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.