Page 1 of 1

[SOLVED] - How to send and get the parameter by URL?

Posted: Tue Apr 22, 2008 6:12 pm
by juliano.ma
Hi friends,

A simple question,

see:

http://localhost/cmsmadesimple/index.ph ... ct&id=2532

How I get the ID come from the URL?

in my definition tag I put this:

$sql = mysql_query("SELECT * FROM table WHERE id = '". $_GET['id'] ."'");

but dont working...

any suggestion?

this my viewproducts page:
 Select an Product: [Select an Product] {databaseconex}{queryselectproduct}

Re: How get the ID come from the URL?

Posted: Wed Apr 23, 2008 12:23 pm
by juliano.ma
Anyone?

i need this a lot.

Re: How get the ID come from the URL?

Posted: Thu Apr 24, 2008 11:45 am
by juliano.ma
Please friends,

I need only know how to send and get parameter by url.

for example:

cmsmadesimple/index.php?page=product&id=$id

how to send that $id correctly by the url?

then how to get that $id correctly by the url?

if i use $_GET['id'] on the product page (defined in my tags)  dont work.

Re: [SOLVED] - How to send and get the parameter by URL?

Posted: Thu Apr 24, 2008 3:12 pm
by juliano.ma
Now I understand.

one should never use the variable id, that is reserved.

I replace by valueid then work nice.