How to display data from database and retrieve corresponding values

When I login from the database it directs me to a new scene where it should display the my username.When I log in,its successfully redirecting to the next scene but its not displaying the username.Here is the code I have written

	IEnumerator  handleEnterScore(string user)
	{

		string login_url = loginCode + "?username=" + user ;//calls the php code 
		WWW logindata = new WWW (login_url);//access the data from the WAMP based database on my localhost
		yield return logindata;
		if (logindata.text == "wrong") 
		{
			namedisplay="error is diaplaying name";
			
			
		} else {
			namedisplay=logindata.text;

		}

		
	}

When switching scenes, anything that isn’t invoked through DontDestroyOnLoad will be lost. Try using DontDestroyOnLoad to persist the object that holds any information you need between the scenes.