Page 1 of 1

Using the Note field within a URL?

Posted: Fri Apr 19, 2019 1:25 am
by Tuck Fheman
I'm trying to include the Note field from Players within a URL to grab an avatar off another site, but for some reason it's not working. I can grab the Custom field and do it without issue.

Example of what will work :

Code: Select all

$getavatar = "https://somesite.com/u/$CUSTOM/avatar";
But if I sub in $NOTE it will not work. I'm storing usernames from other sites in the Custom and Note areas when users create an account so I can grab those avatars and use on the site.

Any help would be much appreciated, thanks!

Disclaimer : I know nothing about PHP, but if I can do it with the Custom field, why not the Note field or what do I need to do to use the Note field in such a fashion?

Re: Using the Note field within a URL?

Posted: Fri Apr 19, 2019 3:27 am
by Tuck Fheman
Disregard. I'm going to use the RealName field instead.

Re: Using the Note field within a URL?

Posted: Fri Apr 19, 2019 9:23 am
by Kent Briggs
Tuck Fheman wrote:I'm trying to include the Note field from Players within a URL to grab an avatar off another site, but for some reason it's not working. I can grab the Custom field and do it without issue.
My guess is that it contains characters that are not allowed in a URL. Print out the value separately and check it. PHP has functions for encoding URLs.