Jump to content

Syntax error--Adding HTML to PHP page


Recommended Posts

I'm trying to add an image (via HTML) to a PHP page.  I get a syntax error when I insert the following HTML code into the PHP page.  Below is the HTML code I inserted.     
<img src="http://www.domain.com/uploads/Image/flags.jpg" alt="description of image">

What am I doing wrong?  Why the syntax error? 
Link to comment
Share on other sites

Thanks.  I killed the </img> tag, and inserted the code you suggested.  Unfortunately, I'm still getting a syntax error on line 2.  Looks like PHP doesn't like the "<" sign. 

Error message reads...

syntax error, unexpected '<' 

So, I deleted the <> tags and now I'm getting a syntax error that reads, "unexpected T_STRING".

Any other suggestions?  I'm just trying to add an image.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.