I have this 1 line of php code in my html page: <?php if ($_GET['exitpop']=='no'){ echo "<!--"; } ?> but somehow when I upload it to the server, & view the source of the page.. it's not there (automatically removed). I also tried to rename my html page to php extension just to see if it'll retain the 1 line code.. but nope, it's still gone.
Is that line showing up when you "View Source" of the page? If so, it's there, it's just not being translated as php by the server... if that's the case, try adding this at the top of the .htaccess file in the folder this is in... AddHandler application/x-httpd-php5 .html Code (markup): (Or replace php5 with whatever php version the server has...)
How are you trying to upload this file? Via ftp? A file manager? Walking us through with details would be helpful.
It has .html I'm uploading via ftp (when I download the file back again to new destination, I do see the php code) I'm using Kompozer, however just using notepad to add the php code so that it doesn't mess it up.
All PHP source code is hidden from the user, all you will see when you view the source is html. Does the code actually work?
Unless you've fiddled around to allow html extensions to parse php, then you MUST use .php as your file extension.