|Keep It Simple, Stupid|
Re: Concantenationby ajt (Prior)
|on May 05, 2003 at 17:53 UTC||Need Help??|
You don't show the whole code, but on the face of it what you show isn't going to work, and worse still it may be very dangerous.
I hope you have properly de-tainted and verified that the value of $course_no is nice and safe, otherwise all sorts of undesirable things may happen!!!
Once you are happy that things are safe, then the following may work better with your concatination:
Your concatination is a bit messy, which I clearly spelt out, so it should be okay now. Other solutions would work too. I've change your fatal to report which file it couldn't open, in case the name isn't what you expected - your error handling won't take care of that unless you pass the filename to it.
Others will have more advice, but also see (from an earlier node of mine):