tags:

views:

81

answers:

2

Hello!

I try to validate my code, but i get a few error, and i need help with this:

I get a few error for this:

  1. end tag for "param" omitted, but OMITTAG NO was specified
  2. cannot generate system identifier for general entity "color"
  3. general entity "color" not defined and no default entity

4 reference not terminated by REFC delimiter

>     > <object
>     > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>     > codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"
>     > id="flaMovie" width="400"
>     > height="235">
>     >             <param name="movie" value="swf/test_movie_purple.swf">
>     >             <param name="FlashVars" value="lan=<?php echo
>     > $_SESSION['lan'];?>&color=<?php echo
>     > $color;?>">
>     >             <param name="quality" value="medium">
>     >             <param name="wmode" value="transparent">
>     >             <embed src="swf/test_movie_purple.swf"
>     > flashvars="lan=<?php echo
>     > $_SESSION['lan'];?>&color=<?php echo
>     > $color;?>" wmode="transparent"
>     > width="400" height="235"
>     > type="application/x-shockwave-flash"></embed></object>

Could anyone help me fix this? Im goin' to crazy..

+1  A: 

end tag for "param" omitted

In HTML-compatible-XHTML, elements that are always empty, like <img> and <param> must use the self-closing syntax:

<param name="movie" value="swf/test_movie_purple.swf" />

(note the /. Same for all other param​s.)

cannot generate system identifier for general entity "color" [and the other errors]

You forget to encode the & character before color=... in the URL. It should be &amp;color=....

Additionally, the old-school <embed> element is undefined in both HTML4 and XHTML1, so it won't validate anyway. See this question for some discussion on Flash embedding methods.

bobince
could you suggest me something else intead of <embed> ? or what should i do with this?
Holian
[Added link for alternatives]
bobince
Check this out as well http://www.alistapart.com/articles/flashsatay
Alex
+1  A: 

Well, for the color, your trying to have the HTML validator validate PHP, that's never going to work. Try to validate the compiled version of the code (after PHP executes and fills in your variables).

For the param closing tag, make sure your params are coded like this: <param ... />

Alex