I want to have something be in a div on the index.php page only on one of the included pages. Like having it show only on "index.php?page=main" but not on "index.php?page=about" or any other pages unless specified. How would I go about doing this? Variables? I'm a beginner when it comes to php.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
It returns the supplied string after stripping any directory parts, so basename('/foo/bar/file') returns just "file", and basename('../../../etc/passwd') returns just "passwd", preventing someone from possibly reading your web host's password file if your code tries to include the unsanitized $_GET value.
In other words, never trust data from forms, query strings, cookies, or any other external source that a malicious (or careless) user could manipulate.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Alright I have all of that sorted out. Thank you so much for your help! A lot of the help guides to explain php seem really vague but you've helped a lot.
Bookmarks