Browser URL issue beacuse special character like "&" : Hello i have a website using php and connected with mysql database. i have also a admindashboard for control the users with some features.in php script i have code

    <a href="../loginUser2.php?userName=<?php echo $SQLRow["userid"];?>" target="_blank" class="a">Records</a>

this code make a login url link like this when complete with username

    mydomain.com/loginUser2.php?userName=abc&xyz

in mysql from table take username abc&xyz or any user. everything is fine just in web browser when i click link for any user then user is automatically login with help of php. but when in any user name use symbol or special character LIKE currently i have issue in "&" symbol. when i edit the url with my self and in web browser when i type manually link with replace of & with %26 link work and user login successfully. i just want if any how user is registered in mysql database with contain any special character symbol like & or etc so how can i fix web browser work automatically handle this type of symbols and characters. 

i tried one stupid thing in myphpadmin edit username column and update username like this  abc%26xyz i thought when i will update then its works like &=%26 but i am fail. please help guide any simple way to fix this.

Thanks