Is it a variable or is it a value?


LoL, just wiped up a quick script for the ad banners on my web site. I want to use different shaped banners in different locations on the website, but I do not want to make a separate file for the code of each ad. Why would I make a separate file for the code of each ad? Why do not I simply past the code in the page I am working on? Well, there are few reasons why I am doing that. They are as follows:

  • I love to make separate files for parts of code I use often and then including it in pages.
  • It is easier to work on code if it is in one location instead of having to edit and updated a whole load of pages.
  • Yes and I am still using include files, although I love mixing SQL and PHP, I still have not completely converted my site to query the pages code from a database. Something I am planning on doing in the coming months. LoL

    But back to the script I was working on. It took all about 2 minutes to write it. But damn, it took me 25 minutes to figure out what my problem was. I would pass in values, but for some reason the script did not deliver. Even though I looked over my code bunch of times, I just could not figure out what the problem was. I Googled other scripts and looked over them, but still nothing. Then I again, I looked over my code and it hit me when I saw what I had done. It was a simple and silly mistake. Instead of comparing my variables to the values being passed in, I was comparing them to other variables in the script. Silly so silly!!!

    All fixed now, woot. Now back to editing the WordPress files. 😀


    Discover more from Titan Fusion

    Subscribe to get the latest posts sent to your email.


    Discover more from Titan Fusion

    Subscribe now to keep reading and get access to the full archive.

    Continue reading