Modern ACC using GET

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,556
Best answers
8
Reaction score
895
Location
Spain
how can I use get to take the a variable for example

Code:
www.localhost/list?id=20
To take varibale 20, cause with modern acc I cant redirect to ?id=20, when I do it I get an error, I can just redirect to list


thanks
 

Korrex

Intermediate OT User
Joined
Jan 19, 2008
Messages
2,748
Best answers
0
Reaction score
110
Uh, some sort of form from a html file using method 'get'?
 

Tibiamakers

yourolist.com
Joined
May 24, 2010
Messages
1,377
Best answers
0
Reaction score
90
Location
España
The file who recieve the ID must have this piece of code
PHP:
$id = mysql_real_escape_string($_GET["id"]);

mysql_query(SELECT `X` FROM `whatever` WHERE `id` = '$id') or die('Error' .mysql_error());
and the url must have www.lala.com/[B]namefile.php?id=5[/B] and the query will be executed with the id = 5
 
OP
Raggaer

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,556
Best answers
8
Reaction score
895
Location
Spain
I didbnt explain well, I can create a apge called 'localhost/list' but cant add localhost/list?id=10 it says the page doesnt exists ;S
 

Tibiamakers

yourolist.com
Joined
May 24, 2010
Messages
1,377
Best answers
0
Reaction score
90
Location
España
I didbnt explain well, I can create a apge called 'localhost/list' but cant add localhost/list?id=10 it says the page doesnt exists ;S


localhost/list?id=10 -> localhost/list.php?id=10

and if you put everything well, it should work
 
OP
Raggaer

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,556
Best answers
8
Reaction score
895
Location
Spain
For modern acc its not like that,
 

Tibiamakers

yourolist.com
Joined
May 24, 2010
Messages
1,377
Best answers
0
Reaction score
90
Location
España
well, that i'm saying to you is PHP, and modernaac is made in PHP, so there will be some form to make that you want, dont know :S
 
OP
Raggaer

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,556
Best answers
8
Reaction score
895
Location
Spain
localhost/list.php wont work but just list does, well.. i Will try another way then not using get
 
Top