• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

RESOLVED 403 Forbidden Error using $_GET or $_POST statements in PHP or Universal snippets

Status
Not open for further replies.

HB_DFW

New member
Messages
2
Likes
0
Points
1
#1
I am receiving a 403 Forbidden error each time I save/update either a PHP or Universal snippet. The offending code is any $_GET or $_POST statement, including when commented out using //. If the code is totally removed, the snippet saves correctly. I have tried clearing browser cache and some other 403 tricks with no resolution.

Has anyone else experienced this, or am I violating some PHP best practice with my code (shown below)?

Thank you,
Howard Bacharach

PHP Code causing the 403 error:

$new_contribution = $_GET['contribution'];
$company = $_GET['company'];
-- or even if commented out --
//$new_contribution = $_GET['contribution'];
//$company = $_GET['company'];

403
Forbidden

Access to this resource on the server is denied!
 

HB_DFW

New member
Messages
2
Likes
0
Points
1
#2
This issue can be resolved using $_REQUEST rather than $_GET or $_POST in your code. Tested and works fine!
 

alexkovalev

Program developer
Staff member
Messages
267
Likes
19
Points
18
#3
Hi,

Did you solve the problem or do you still need our help?

--
Best regards, Alex

Webcraftic team
 
Status
Not open for further replies.