Jump to content

problem with url link


scmeeker

Recommended Posts

I'm having a problem with including a list of clickable links. They keep including my website address before the web address instead of the the web address alone.

 

Here is the code I'm using for it. The $item_url is the web address from the database.

 

$content .="<table width=\"700\" height=\"50\" border=\"0\"><tr><td width=\"500\" class=\"titles\"><a href=$item_url target=\"_blank\">$item_title</a></td></tr><tr>
          <td width=\"400\" class=blackfont>Location:  {$item_city}, {$item_state}</td></tr><tr><td class=blackfont>Country:  {$item_country}</td></tr><br />
</table>";

Link to comment
Share on other sites

Where is the code that sets $item_url.

 

This may or may not be the cause of your error depending on whether or not $item_url contains any spaces, however, if you use double quotes to enclose your HTML tag attribute values, is a good practice to follow suite.

 

$content .="<table width=\"700\" height=\"50\" border=\"0\"><tr><td width=\"500\" class=\"titles\"><a href=\"$item_url\" target=\"_blank\">$item_title</a></td></tr><tr>          <td width=\"400\" class=blackfont>Location:  {$item_city}, {$item_state}</td></tr><tr><td class=blackfont>Country:  {$item_country}</td></tr><br /></table>";

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.

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.