If Request.Rawurl="" then in php?

I am new to php so I am trying to put together this:

(ASP)

If Request.Rawurl=“http://www.mydomain.com/sidebbb.html” then

end if

what I trying to accomplish is to insert a certain Html code in between if I am on a certain page on the website

Thanks guys for letting me disturb you with such a basic beginner question

/Johan

As a matter of fact, on the server side there is no such thing as “raw url”. Only separate parts, as it came to server.
You can build it back together yourself, but actually you don’t need protocol or host parts, as it always are same, but URI. So, you can use $_SERVER[‘REQUEST_URI’] variable.
If you still want to build it, run phpinfo(32); function to see all corresponding variable names

so it could be (assume no other PHP code on the page)


some HTML code
<? if ($_SERVER['REQUEST_URI']=="/sidebbb.html"): ?>
certain Html code
<? endif ?>
some other HTML code

Note that PHP does not work in .html files but only in the .php files

many thanks Shrapnel works fine :slight_smile: