1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

php coding help

Discussion in 'PHP' started by irdogg, Mar 23, 2013.

  1. #1
    how i need it
    <a href="http://www.mysite.com" title="mysite" target="_blank">mysite</a>
    Code (markup):
    the code im trying to edit
    if ($realurl ==1) {
     
                  $websitelink = "<a href='".$websiteurl."'>".$websitename."</a>";
     
                } else {
     
                  $websitelink = "<a href='".$siteurl."linkout.php?id=".$linkid."'>".$websitename."</a>";
     
                }
     
                $content = $content.$websitelink."";
    Code (markup):

     
    irdogg, Mar 23, 2013 IP
  2. Strider64

    Strider64 Member

    Messages:
    40
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    25
    #2
    I think, although I really don't know what you're doing with "linkout.php?=\"" , so I might be totally wrong?

    $websitelink ="<a href=\"";
    if ($realurl ==1)
    {
         $websitelink .= $websiteurl;          
    }
    else
    {
         $websitelink .= $siteurl . "linkout.php?id=\"" . $linkid;
     
    }
    $websitelink .=  "\">" . $websitename."</a>";
    PHP:
     
    Strider64, Mar 23, 2013 IP
  3. wiicker95

    wiicker95 Well-Known Member

    Messages:
    438
    Likes Received:
    37
    Best Answers:
    10
    Trophy Points:
    100
    #3
    First of all, an anchor cannot have a title. Second of all, the target attribute has no business in any website written in this century.
     
    wiicker95, Mar 24, 2013 IP