PDA

View Full Version : Validating issue


CaptainB
04-25-2008, 06:19 PM
Hi guys,

I have a little problem which I can't seem to figure out.
This is my code:

<input type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>"><

And this is my error:
… value="<?php echo $form->value("user"); ?>">
Have you forgotten the "equal" sign marking the separation between the attribute and its declared value? Typical syntax is attribute="value".


When I then insert the equal sign I get this error:
Line 60, Column 92: an attribute value literal can occur in an attribute specification list only after a VI delimiter.
… value="<?php echo $form->value("user"); ?>">
Have you forgotten the "equal" sign marking the separation between the attribute and its declared value? Typical syntax is attribute="value".


I tried to do that too, but it still does not work. Anybody knows how to come around that?

Apostropartheid
04-25-2008, 06:33 PM
Your PHP isn’t being parsed?
Have you got the PHP file extension on the document?

CaptainB
04-25-2008, 06:47 PM
Yeah, my PHP is being parsed, but it just won't validate with W3C the way it's written. So, I wondered if there was a way to make i validate?

Apostropartheid
04-25-2008, 06:49 PM
Get the PHP parsed and validate that document. It’s more precise live. Or you could just replace the instructions with ‘placeholder’ values in the meantime.
Note that the W3C is a HTML validator and won’t process programming languages—they must output the pure HTML before it will make sense to it.

So, basically, don’t upload a local .php document, as that still has instructions to the PHP processor which the validator can’t recognize.

CaptainB
04-25-2008, 09:28 PM
Ah, of course... Why didn't I think of that. Thanks :thumbsup: