old Coldfusion Links

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jorgepino
Forum Newbie
Posts: 1
Joined: Fri Jul 29, 2005 9:14 pm
Location: ny

old Coldfusion Links

Post 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
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post 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.
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post 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?
Post Reply