My user-friendly URL does not pass variable by GET

Asked

Viewed 40 times

0

I already looked at the questions related to this problem here in Stack and I was not successful, currently I am able to pass the values through the URL but I can not call them on another page with GET. URL goes like this:

http://localhost/sustenagil/noticia/o-projeto-soja-mais-sustentavel/34/

My line on . htaccess so:

RewriteRule noticia/([a-z0-9-]+)/([0-9]+)/ noticia.php?id=$2 [NC]

In the news.php ta default:

$id = $_GET['id'];

Only it won’t, I’m sure the problem is in . htaccess but I can’t find, I’ve changed practically the whole line.

The error that appears is:

"Notice: Undefined index: id in C: wamp64 www sustenagil noticia.php on line 53"

  • $_GET['id'] has reached zero? If not, what happened?

  • "Notice: Undefined index: id in C: wamp64 www sustenagil noticia.php on line 53" Line 53: $id = $_GET['id'];

  • Put the code so we can help

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.