royvano royvano - 26 days ago 15
PHP Question

Get is not working PHP

I'm working on a Get but I never get any value..
I know the problem is in the .htaccess which looks like this:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z]*)/?([a-zA-Z]*)?/?([a-zA-Z0-9]*)?/?$ index.php?controller=$1&action=$2&id=$3 [NC,L]


I don't know which part is creating the problem, the link looks like this: http://royvanoeteren.nl/portfolio/delete?page_ID=21

When I do the $_GET['page_ID'] I don't get 21 but I get no value.

Does anybody know which part of the .htaccess is causing the problem?

I like to hear from you :)

Answer

There is no page_ID located in your rewrite string index.php?controller=$1&action=$2&id=$3

That's why, I think ;)

Also you need to add the QSA tag to the string (https://httpd.apache.org/docs/current/rewrite/flags.html)