1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help please - some weird PHP

Discussion in 'White Hat SEO' started by Newcastle, Mar 1, 2015.

  1. Newcastle

    Newcastle Registered Member

    Joined:
    Mar 4, 2014
    Messages:
    88
    Likes Received:
    5
    I have a site that displays the facebook page of a user within a profile page.

    When I test the site by creating a test user everything is fine, but when users sign up the site put in full domain name before the the facebook url

    my test site - http://facebook.com/myfanpage
    user signs - http://domain.com/foler/http://facebook.com/myfanpage



    This is the code.
    $fb = get_post_meta($mypid,'facebook',true);




    if(!empty($fb))
    {
    echo '<a href="'.get_post_meta($mypid,'facebook',true).'">Facebook</a>';
    echo '<br/>';
    $mp++;
    }

    Any ideas?
     
  2. Newcastle

    Newcastle Registered Member

    Joined:
    Mar 4, 2014
    Messages:
    88
    Likes Received:
    5
    It seems to be ok if I echo the it out - but when it becomes a link it adds full domain path.