I want to send hash(#) via URL- Please Help

I am sending username and password from client to the server for LDAP authentication. I am able to send everything other than hash(#). Below is my code

$str=fopen(“https://10.10.10.15/authentication.php?u=$username&p=$password","r”);
$line=trim(fgets($str));
if($line==“true”)
{
header(“location:home.php”);
}
else
{
$error = “<font color=red><b>Invalid Username or Password</b></font><br>”;
}

if I enter my password which contain # , than it gives the error

Suppose my

username: omp
Password: omp#1234

though my password is correct it gives the error. is there any other method to send the username and password to the server? Please help me.

Some characters have special meaning in URLs, such as : / ? # % +
You’ll need to escape those special characters.

http://php.net/manual/en/function.urlencode.php

$urlEscapedPassword = urlencode($password)

Thanks a lot Jeff Mott

it is working now.