index.php?Midi=D into D.php ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

index.php?Midi=D into D.php ?

Post by psychotomus »

how do some scripts that really use index.php?Midi=D end up being D.php. how can I do that without the file actually existing?


on a site note. how come "Notify me when a reply is posted" isnt working.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

the scripts that would end up doing the midi=D that end up being D.php are using $_GET to use a header to the new page like

Code: Select all

$go = $_GET['midi'];

header("Location: ".$go.".php");
and on your other note you sure you supplied the correct email address?
Syranide
Forum Contributor
Posts: 281
Joined: Fri May 20, 2005 3:16 pm
Location: Sweden

Post by Syranide »

you should really trying search the forum first.
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

Post by psychotomus »

shiznatix, think you got the wrong idea. the D.php doesnt exist but it like acts like it does.


like those phpBB mods that change all your pages into html files but those html files really dont exist. im talking about something like that.

and Syranide, Get the hell off my case. If you dont have nothing nice to say then dont but in my help threads. If I knew WTF this was called. I woulda done searched so therefor i asked for help.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

simmer down there no need to get angry.

so are you saying that d.php ends up existing even though it didn't in the first place? im sure its hard for you to word the siuation but how do you know that d.php ends up existing? this probebly isn't what you are asking but this is what first comes to mind.

Code: Select all

$go = $_GET['midi'];

if ($go == 'd')
{
    //display certain code here
}
else if ($go == 'e')
{
    //display some other code here
}
or maybe it creates a file on the fly then redirects you to it based on what midi equals.
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

Post Reply