Custom form in theme template displaying internal server error upon submission

I have a custom form in WordPress theme template but it is displaying internal server error upon submission. There is no

I have a custom form in WordPress theme template but it is displaying internal server error upon submission. There is no error in error.log file regarding this submission. I am hosting my website on bluehost and here is my form

<form method="post"  action="<?php echo get_template_directory_uri(); ?>/formprocessing.php">    
        <label for="first-name">Name*</label>
        <input class="form-control" type="text" id="name" name="volunteerName" required/>
        <label for="address">Address*</label>
        <input class="form-control" type="text" id="address" name="volunteerAddress" required/>
        <label for="email">Email*</label>
        <input class="form-control" type="email" id="email" name="volunteerEmail" required/>
        <input class="form-control" class="btn btn-primary" type="submit" value="Submit" id=""/>
</form>

In formprocessing.php file I am just displaying some text and upon submission it redirects to this template file but displaying Internal server error.

<?php   
if (isset($_POST['volunteerName'])){

echo "Form working";
exit;

}
?>

I have spent a lot of time to figure out this issue but still not able to figure out this. Your help will be much appreciated.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745662096a4638899.html

相关推荐

  • Custom form in theme template displaying internal server error upon submission

    I have a custom form in WordPress theme template but it is displaying internal server error upon submission. There is no

    21天前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信