PDA

View Full Version : Two questions...


Dean C
09-28-2002, 07:08 PM
On some addresses on some sites i see that they dont have the php filename in the url such as this one:

http://www.rapmusic.com/rapmusic/content/?content=artists

noticed its ?content=artists instead of filename.php?content=artists...

id like to know how to do that :D

____________________

Secondly on some download scripts (well most download scripts)...

when you click a link to download a file it is not the path to the file on your server

e.g. yourdomain.com/files/file.zip

its sometimes:

yourdomain.com/download.php?downloadid=1

How would i go about doing that?

_____________

Thanks in Advance

- miSt

Neo
09-28-2002, 09:37 PM
whatever your default file name is set by your server.. name the PHP files that.. so default.php

then in the file just do this

if($content=="this") {

// stuff here

}

then

http://www.yourdomian.com/?content=this

should work.

Dean C
09-29-2002, 10:10 AM
but $content is a variable... what do you assign the variable?

- miSt

Dean C
10-02-2002, 03:45 PM
^bump

NTLDR
10-02-2002, 03:49 PM
In the example there by Neo $content is assigned the value that it is given in the URL:

ie /?content=artists

Or showthread.php?action=showpost

Where $action is the variable.