Hi all,
I really don't know much at all about using php. However I made a site for a client, probably about 6 pages. I created it at first using .html pages. I then renamed those to .php, and I created includes for the top and bottom menu leaving them as .html pages.
So the include code I used looks like this:
<?php include("includes/mainnav.html"); ?>
the 2nd include for the bottom menu looks similar
I also host my clients site, and recently found out that someone had setup a phishing site in some of the folders. The helpdesk are telling me:
If the include() statements do not check for sanitized input or only use local includes, they can be exploited very easily. These include() statements are the main target for remote file inclusion attacks that allow people to deface/hack domains.
If this is true, how then would I make this code safer? I assumed I was using something that was so basic that I never would have dreamed this would happen.
I suppose my second question might be, would you agree with what was said in this case as I described my pages, or do you think I need to look elsewhere for a possible cause?
Extremely grateful for any help with this!