Workaround for Case-Sensitive Variables?

Hello,

I’m the web admin for Jig Stop Tackle’s online store. I’ve been in the process of cleaning up the site code a bit after a host migration (ditched Web.com’s crappy overpriced service for GoDaddy). Many issues have come up in the switch, mostly due to switching from a Windows host to a Linux host. This forum has already helped me sort out one major problem, but here I am again with another. :stuck_out_tongue:

The site has product images organized in separate folders by category (hooks, lures, rods, etc.), and the pages displaying these images refer to them with your typical variables. Since the switch, these variables have suddenly become very strictly case-sensitive. This would be okay if everything on the site used the variables, but some HTML snippets tacked on after are hard-coded addresses, and it would take quite a while to switch every /lures/ to /Lures/ and such.

An example of what I’m talking about can be seen here, in our product line display page:
[php]echo "

<td align=“center”><img src=“https://www.jigstop.com/store/images/$Category/$LineImage” ";[/php]

The $Category refers to the folder that the images are in, which used to be called “lures” as one example. I’ve temporarily renamed them to “Lures”, but that means that hard-coded image links are no longer valid, like this one:

<img src="https://www.jigstop.com/store/images/lures/shimano-waxwing-main.jpg">

Is there any kind of workaround I could apply to these variable references?

Nevermind, I had an epiphany and applied a fix myself. For those having the same problem, I solved it by adding the following assertion after the variable listing and before the img echo:

[php]$Category = strtolower($Category);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service