I had a website on a server. I have now moved it to my PC using Wamp5 installation. However pages using input boxes are not working. Instead of a blank input box, the php code is visible!!

I know php is available on the page as calling phpinfo() loads it into my webpage ahead of the page itself. Any ideas, thanks

Below is line of code on one of the input boxes.


<input name="QTY[1]" value="<?=$_SESSION[1]?>" size="6" style="background-color: #FFFF00; font-weight:700" /><tr>

You are using short_open_tags in your code. The default ini setting is for short_open_tags=off. Either change your php.ini file so that short_open_tags=ON (not recommended), or replace all short_open_tags in your code with full open tags:

// replace <? with <?php

If you were wondering...

<?=

should be replaced with:

<?php echo

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.