0
votes

I've got to make friendly URLS work (settings + .htaccess). So, rather than getting /member.html I want to get /member.

When I try to use my PHP forms (that have worked elsewhere) they don't work here.

The form method is POST I've tried various URLS like /, /index.php, /?id=1 and the long URL.

I've tried all sorts of POST checks like:

if($_SERVER["REQUEST_METHOD"] == "POST"){   
echo "2 server request<br/>";
}

if (isset($_POST['submitButton'])){
echo "3 post submitButton is set<br/>";
}

if ($_POST['submitButton']){
echo "4 post submitButton<br/>";
}

... none of these return. So the page doesn't recognize the POST header.

This leads me to suspect that the friendly URLs is the culprit. Either that or some security setting that prevents POST traffic.

2

2 Answers

0
votes

This one for you can using if and else if statement. Otherwise use the all if statements you must create a else statement.

If user request to outer query request, PHP go to the else statement.

So you need a new layout.

0
votes

I seem to have fixed the problem. I installed FormIt add on.

I don't think i'm using the FormIt functionality as such but by simply adding [[FormIt]] to the page - it is operating as expected now.

It seems that POST doesn't work unless you add the addon