Today, I am facing a weird problem.
I am getting 403 forbidden error while posting ajax data to a PHP file.
An error occurs for a specific string while posting via ajax call.
Error params and string
temp_name: Reminder (WITH OPTION TO confirm)
No error for the below string [same string without space before ( ]
temp_name: Reminder(WITH OPTION TO confirm)
If we remove the space before the open bracket, it’s working fine. Otherwise, it throws 403 forbidden as Ajax response.
403 Forbidden
In PHP, I am just getting the post value as
$temp_name=!empty($_POST['temp_name'])?$_POST['temp_name']:'';
Unable to find the cause of the error. Please suggest any idea to fix it.