Hi all,
I just started using PHP after using ASP for a little while. I want to highlight a button as a navigation queue for each section of the site:
For example, if I am in "www.here.com/one", PHP would grab the "/one" and post a particular image, and "www.here.com/two" would display another image by grabbing the "/two" from the URL.
I have the code to "instr" the URL and the "if else" statements in ASP, what do you recommend I do?
my ASP code is as follows:
<%
c_url = request.servervariables("url")
if Instr(c_url, "http") = 0 then
dim anURL
anURL = "http"
if Request.ServerVariables("server_port_secure") = "1" then
anURL = anURL & "://"
else
anURL = anURL & "://"
end if
c_url = anURL & Request.ServerVariables("server_name") & Request.ServerVariables("url")
end if
%>
<% if instr(c_url,"one") <> 0 then %>
IF highlighted, do this
<% else %>
otherwise do this
<% end if %>
I'm really a newbie (n as in been using PHP for less than a week) at this so if you reply, please bear with me...
Thanks...🙁