Hello,
i am writing a snippet and need to get the URL of the current document.
When i try $_SERVER['PHP_SELF'] i allways get "index.php" - no matter what page i am on.
Here is the code:
echo"<form id=\"kontaktformular1\" method=\"post\" action=\""; echo $_SERVER['PHP_SELF']; echo"\">";
Yes, i know you shall not use echo in snippets (even though i don't understand why) - but still i'd like to figure out how it goes.
Sidequestion: What could i do instead using echo in that snippet? Should i call a chunk from within the snippet?
And if this would be a way - how would i do this again? Like this?
But to come back to my question: I'd be glad if somecone could tell me how to output the URL of the curent page within a snippet.
Thanky you, Phil