hmsg Posted May 21, 2006 Share Posted May 21, 2006 I have a file "produtos.php" that i want to make a link to another file "cprodutos.php" passing a variable with a number.This is the code that i have in produtos.php:print("<p style=\"margin-top: 0; margin-bottom: 0\"> <a href=\"cprodutos.php?idcat=$campo_id\">$campo_c</a>");I think this part is correct, because the link is made correctly, it gives me this: [a href=\"http://www.hmsg.net/bijuteria/cprodutos.php?idcat=2\" target=\"_blank\"]http://www.hmsg.net/bijuteria/cprodutos.php?idcat=2[/a]the 2 is the number that i want to pass.But in the cprodutos.php i don't know how to get the variable? is there any function to get the idact=2? What code should i put in the cprodutos.php? Whith the best regards Hugo Gomes Link to comment https://forums.phpfreaks.com/topic/10114-problem-with-variables/ Share on other sites More sharing options...
alpine Posted May 21, 2006 Share Posted May 21, 2006 [code]$idact = $_GET['idact'];[/code] Link to comment https://forums.phpfreaks.com/topic/10114-problem-with-variables/#findComment-37651 Share on other sites More sharing options...
litebearer Posted May 21, 2006 Share Posted May 21, 2006 Might also consider using sessions Link to comment https://forums.phpfreaks.com/topic/10114-problem-with-variables/#findComment-37663 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.