Jump to content


PHP Help


3 replies to this topic

#1 J-John

    Young Padawan

  • Members
  • Pip
  • 14 posts
  • Location:South Carolina
  • Interests:Football, Basketball, Web Design, Graphics

Posted 17 August 2006 - 08:39 PM

It's been awhile since I did anything with PHP and I actually forgot the friggin include code that makes the link look like http://www.yourname.com/main.php?id=test.html

#2 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 17 August 2006 - 08:49 PM

well...i would not advise ever ever ever using include like that as even a beginner at php could hack you site like that.

include "file.ext";

Again please dont use a user defined file like you are. Use switch or another method for navigation.

#3 Wybe

    Jedi In Training

  • Members
  • PipPip
  • 399 posts
  • Gender:Male
  • Location:the Netherlands
  • Interests:Graphic design, digital and traditional, street style, graffiti, guerilla drawing, typography, coding, sex

Posted 18 August 2006 - 05:00 AM

if(isset($_GET["page"])) {
	if($_GET["page"]=="home") {
		include "index.php";
	} else	if($_GET["page"]=="gallery") {
		include "gallery.php";
	} else	if($_GET["page"]=="hidden") {
		include "porno.php";
	} else	if($_GET["page"]=="contact") {
		include "contact.php";
	}
} else {
	include "index.php";
}

defaults to include index.php

#4 joe

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Location:stuck in the middle of cyber space

Posted 20 August 2006 - 05:54 AM

i think if u using like that, it will make a hole in ur website and someone can explore that.
it can be like this (for example) : http://www.yourname....hp?id=index.php and bangggg....





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users