forms - Cannot access a file in the theme (twentynineteen-child) folder

Get a 403 Forbidden Error on the Server when I try to access this script which processes form data. Works on my Local Ma

Get a 403 Forbidden Error on the Server when I try to access this script which processes form data. Works on my Local Machine though. .php

Here's my form action.

<form action="<?php echo get_stylesheet_directory_uri()  . "/add_restaurant.php"; ?>" id="add_restaurant" method="post">

Get a 403 Forbidden Error on the Server when I try to access this script which processes form data. Works on my Local Machine though. http://example/wp-content/themes/twentynineteen-child/add_restaurant.php

Here's my form action.

<form action="<?php echo get_stylesheet_directory_uri()  . "/add_restaurant.php"; ?>" id="add_restaurant" method="post">
Share Improve this question edited Sep 26, 2019 at 21:16 Sunil Chandurkar asked Sep 26, 2019 at 19:05 Sunil ChandurkarSunil Chandurkar 11 bronze badge 1
  • Thanks for the Negative Point. Was extremely frustrated after doing a lot of research. That's why I asked the question here. – Sunil Chandurkar Commented Sep 26, 2019 at 20:03
Add a comment  | 

1 Answer 1

Reset to default 0

Could you post your code... its better way to help you.

So, I guess you have html form ?

An idea :

Don't specify any path on your form and let manage it into your functions.php

add_action('init', 'my_form_process');
function my_form_process(){
  // Do nonce check, Post check...
}

Have look for Nonce security check : Nonce WordPress page

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

相关推荐

  • forms - Cannot access a file in the theme (twentynineteen-child) folder

    Get a 403 Forbidden Error on the Server when I try to access this script which processes form data. Works on my Local Ma

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信