Page 1 of 1

old Coldfusion Links

Posted: Fri Jul 29, 2005 9:19 pm
by jorgepino
the situation : The site was previusly created on Coldfusion and it was move to PHP
now we have links like index.cfm?module=mainpage,

The question : how can i retrive the url data after the "?"
?module=mainpage and make work with index.php?module=mainpage

thanks

Posted: Fri Jul 29, 2005 9:50 pm
by evilmonkey
If you're not using coldfusion anymore, you can make your webserver make PHP handle the .cfm extension as opposed to making coldfusion handle it. Otherwise, you'd have to make a CFM script that would forward all those variables to PHP, as in redirect it to a PHP page. No idea how you'd do that, I don't know cfm.

Posted: Fri Jul 29, 2005 10:48 pm
by nielsene
In PHP the query string parameters are parsed into the $_GET superglobal.

In your script you would get at them like

Code: Select all

$page = $_GET["module"];
// $page would equal "mainpage" in your example URL now
Is that what you were asking?