Smudly Posted November 28, 2010 Share Posted November 28, 2010 I am working on a Contact Form in my .php file. I have always worked with loose doctypes, however, today I am using strict. I have my php above my html, and none of the code runs. Instead, it just displays some of the Echos to the page (these aren't even called yet). Also, in my form, I have the following: <INPUT NAME="Name" SIZE="30" value="<?php echo $Name; ?>"> On the page inside the field, it is displaying: <?php echo $Name; ?> What is going on here and how can I fix this issue? Yes, the pages are .php Here is the doctype: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Any input appreciated Quote Link to comment Share on other sites More sharing options...
marcus Posted November 28, 2010 Share Posted November 28, 2010 Show us all of the code. Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted November 28, 2010 Share Posted November 28, 2010 Yes, please show your code. There's no way for the doctype to be the source of your problem. PHP generates HTML, but cannot be affected by it. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted November 28, 2010 Share Posted November 28, 2010 Php is a server side scripting language. The doc type has nothing to do with php. Only the browser cares about the doc type. If your php code is not being parsed and executed on the server it means that something is preventing the server from seeing the php code as php code. You are either NOT using a .php extension on the file or you didn't browse to the file using a URL in your browser's address bar or you put the file into a location where the php language is disabled on your server... Quote Link to comment 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.