antray Posted June 5, 2006 Share Posted June 5, 2006 I am currently testing a php form on a new server, which hasn't gone public yet. I am working on a vurtual server. One form, floor estimation form, is supposed to carry a variable from a link to load color selection. The code is below:[code] <?php include "".$color.".php"; ?> [/code]Link to the problem form: [a href=\"http://gndzero.com/form-test/flooring-estimation-new.php?item=DuroStat%20Tile&color=dscolor\" target=\"_blank\"]http://gndzero.com/form-test/flooring-esti...e&color=dscolor[/a]I tested it on my host and it worked fine, so I wonder if its a php version issue. [a href=\"http://www.gndzero.com/flooring_estimation.php?item=DuroStat_Tile&color=dscolor\" target=\"_blank\"]Here's what it should look like when the colors load.[/a]The php version of the new server is 4.4.2-1-1b1The one I tested it on, my host, is: 4.4.1 [i]- it works on this one!![/i] Where should I start on this issue? Quote Link to comment https://forums.phpfreaks.com/topic/11259-include-function-no-longer-working/ Share on other sites More sharing options...
Caesar Posted June 5, 2006 Share Posted June 5, 2006 I suspect that register_globals is turned off on the other host. Which is why the value of $color is not being recognized. If the value is being passed via the url...then do this:[code]$color = $_GET[colorvalue];include $color.'.php';[/code]If it's being submitted via a form, then do this:[code]$color = $_POST[colorvalue];include $color.'.php';[/code]Hope that help. Good luck. Quote Link to comment https://forums.phpfreaks.com/topic/11259-include-function-no-longer-working/#findComment-42187 Share on other sites More sharing options...
joecooper Posted June 5, 2006 Share Posted June 5, 2006 or an eaiser wayinclude "$color.php"; Quote Link to comment https://forums.phpfreaks.com/topic/11259-include-function-no-longer-working/#findComment-42236 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.