cdikland Posted October 1, 2007 Share Posted October 1, 2007 I just started back in php again after a 3-4 year break. Recently installed php v 5.2.4 along with apache v2,2 running under windows XP. Everything seems to run ok except when/where i mix php code such as <?=$varname?> within html. The value associated with $varname is never inserted into the html. Instead what appears is exactly what I placed in the html (i.e. <?=$varname?> will appear within the html instead of its value). Here is a snippet of the culprit file <!--- <TR><td>Company </td><td><INPUT NAME='company' value='<?=$Scompany?>'></td></TR> <TR><td>Vessel Name </td><td><INPUT NAME='vessel' value='<?=$Svessel?>'></td></TR> --> The exact same php file executed under version 4.n of php works fine. ??? What am I missing? Is there a switch I need to enable/disable in the v5.n php .ini file?? Quote Link to comment https://forums.phpfreaks.com/topic/71415-solved-variable-substitution-ie/ Share on other sites More sharing options...
BlueSkyIS Posted October 1, 2007 Share Posted October 1, 2007 smart tags setting. <?php$somevar;?> might work as you have it now.. Quote Link to comment https://forums.phpfreaks.com/topic/71415-solved-variable-substitution-ie/#findComment-359454 Share on other sites More sharing options...
MadTechie Posted October 1, 2007 Share Posted October 1, 2007 personally i hate short tags and would normally use this ....' value='<?php echo $Scompany; ?>'></td>.... check short tags is enables in the php.ini file Quote Link to comment https://forums.phpfreaks.com/topic/71415-solved-variable-substitution-ie/#findComment-359468 Share on other sites More sharing options...
cdikland Posted October 1, 2007 Author Share Posted October 1, 2007 That did the trick... Thanks :) Quote Link to comment https://forums.phpfreaks.com/topic/71415-solved-variable-substitution-ie/#findComment-359499 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.