Hi
Sorry to post what may be a numpty question. I can usually work things out but this has got me stuck. Can't seem to find an answer I understand through Google either :-(
I'm jst trying to learn PHP and really struggling. I have a MYSQL database with fields for specifications and now want to add an image. I've got it in a table appearing in the correct page and managed to get an alt tag and title picked up from the name and model fields. It's all fine, but the validation is suggesting I've got quote marks wrong? I don't yet understand why you would use " or ' but be substituting one for the other I've managed to get the image to appear and the properties correct. I now want it valid to XHTML
so here's the code
<td align='right'><img src=" . $image ." alt='$name $model' title='$name $model' /> <br /></td></tr></table>
and here's the error
Line 41, Column 31: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
<td align='right'><img src= alt='Bronica Zenzanon-EII 500mm f/8' title='Broni
Hope you guys can and will point me in the right direction
Edit Oh hang on I've added ' around img src and it now works...didn't need to post after all...unless you have a better way of doing what I've done?
<td align='right'><img src='" . $image ."' alt='$name $model' title='$name $model' /> <br /></td></tr></table>







Bookmarks