W3C Validator & PHP code
I'm having an issue with the following code running through the validator.
It gives an error about the PHP code in the value section. Can someone help me get past this?
<input type="text" id="uname" name="uname" value="<?php print "$uname"; ?>" size="30" />
The PHP code itself is irrelevant as the validator only ever sees the output from the processed code. What is contained in the $uname variable?
Note that you should not be submitting your PHP source code directly to the validator: you want to submit the [X]HTML that it outputs when the PHP script is executed. If it's on a web site, you can just submit the URL to the validator. Otherwise if testing locally, run the script in your browser, then do a "View Source" in the resulting browser page, and copy-and-paste that to the browser. Even easier is to use the "Web Developer" extension in Firefox, and after the page is displayed, do a Tools -> Web Developer -> Tools -> Validate Local HTML.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
WOW! That is why I love this site! I am developing it locally & this is exactly what I needed!
Originally Posted by NogDog
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)