Jump to content

[SOLVED] Variable substitution (i.e. <?=$Scompany?>)


cdikland

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.