PDA

View Full Version : Setting up a file database



Rockonmetal
09-22-2007, 06:58 PM
I want to set up a table or database or something so I can use the

$id = $_GET["id"];
And then have the file opened up in a new window... or something like that

I really don't know how to explain it... but if you see any links like this:

http://www.sitename.com/items.php?id=12
I wanna get it so that I can do something like that using a mysql database but I don't know how to set up a mysql table very well... I have search google for this and have had absolutely no luck at all...

This is different from the question I asked in the PHP form about IDs I want to set up a table so I can do something like that...


Thanks if you got any questions let me know... so I could explain further...

Twey
09-22-2007, 08:14 PM
CREATE TABLE table_name ( name type, name type, name type, ... );

insanemonkey
09-22-2007, 08:43 PM
Do something like this, I am not really good with mysql so correct me if im wrong!

CREATE TABLE urls (
id TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
url TEXT NOT NULL,
)

its something like that, i have not masterd this so i do not know.

then use ..

$id = $_GET["id"];

I think this is how it works..

Rockonmetal
09-22-2007, 10:30 PM
k thanks... guys i'll try both of them out...

thetestingsite
09-22-2007, 10:35 PM
k thanks... guys i'll try both of them out...

You would want to try out insanemonkey's if you are a copy/paste kind of person. Mostly because Twey's example just shows what you should do syntax wise. insanemonkey's shows what a "finished" sql query would look like.

Hope this helps.

Rockonmetal
10-03-2007, 10:58 PM
Ok... now how do I add stuff so that when I type in http://www.pureadd.com/files.php?id=12
that i load the file???