views:

35

answers:

1

Hello,

I'm trying to make a data filter with php and to do so, I want to use a form with 'get' method. Not the problem is, that I get this notice, when I'm trying to refer to any of the $_GET['var']'s.

echo $_GET['kraj'];

Notice: Undefined index: kraj in C:\wamp\www\inc\pages\filtr.php on line 23

And here is the URL code:

alt text

What I think may be the problem is .htaccess file, that rewrites the URL's to pretty ones.

Here is an example of my .htaccess:

RewriteEngine on
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ index.php?detail1=$1&detail2=$2&detail3=$3 [L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ index.php?detail1=$1&detail2=$2 [L]
RewriteRule ^([^/\.]+)/?$ index.php?detail1=$1 [L]

Is it possible to refer to $_GET[''] after the '?' simbol with those rules? If not, how can I fix it, so it can work.

Thanks, Mike

+2  A: 

Add QSA to the flags to append to the query string instead of replacing it.

Ignacio Vazquez-Abrams
Could you please tell me, how to use the QSA? Thanks.
Mike
Like `[QSA,L]`.
Ignacio Vazquez-Abrams
Ok, tryed it and it works, thanks. ;-) I'm just not very much into mod_rewrite, so I didn't know what to do with it, thanks for quick reply.
Mike