Jump to content

Recommended Posts

Hello ,

I have a image upload site www.vobgaming.com if you go there and upload a file it will give you a myspace code it comes out like so. <a href='http://littlepic.zapto.org'><img src='http://vobgaming.com/images_dir/picname.jpg'></a> what i need to do is have the php echo ' as ". The code is below.


<tr><td><b><img src="images_0/1794icon_friends.gif">&nbsp;MySpace Code:</b><td><input type="text" name="thetext" size="70" value = "<a href='<? echo $hosturl; ?>'><img src='<?echo $urlf; ?>'></a>"</td></tr>

that echos <a href='http://littlepic.zapto.org'><img src='http://vobgaming.com/images_dir/picname.jpg'></a>

I need to replace ' with " with out getting an erorr.

Thanks in advanced!
Link to comment
https://forums.phpfreaks.com/topic/13566-php-html-code-echo-erorr/
Share on other sites

This is what I have for the exact same application.
you want to use  HTML chars, like 
&gt; = > 
&quot; =  "

[code]     <table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>HTML Code: </td>
        <td><input name="textfield" type="text" size="30" value="&lt;img src=&quot;http://www.mysite.com/photos/<? echo $row['imageLocation'] ?>&quot;&gt;" onClick="this.focus(); this.select()" title="display image on sites like myspace or ebay"></td>
          </tr>
      <tr>
        <td>Forum Code: </td>
        <td><input name="textfield2" type="text" size="30" value="[IMG]http://www.mysite.com/photos/<? echo $row['imageLocation'] ?>[/IMG]" onClick="this.focus(); this.select()" title="display image in a forum using BBcode"></td>
            </tr>
      <tr>
        <td>HTML Link: </td>
        <td><input name="textfield3" type="text" size="30" value="&lt;a href=&quot;http://www.mysite.com/photos/<? echo $row['imageLocation'] ?>&quot;&gt;Click Here To View Image&lt;/a&gt;" onClick="this.focus(); this.select()" title="create an HTML hyperlink to the image for sites like myspace or ebay"></td>
            </tr>
          </table>[/code]

this lets you click on the text field to auto highlight the code snippet too. kind of like photobucket
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.

Guest
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.