Using PHP to find MySQL databases...?

  • Thread starter Thread starter ben
  • Start date Start date
B

ben

Guest
I want "username" to be stored into a variable and then check if the MySQL database exists with that name..I am making a site and whenever someone registers, a new DATABASE, not Table, DATABASE is created. I DONT want them to press submit but I want to be able to check if a database with the same username exists AS SOON as they take their pointer off the text area. How do I do this?

In HTML, you could do something like this.

<input type="text" id="noname" onblur="thefunctionIwant()" />

I don't want them to Post anything. Only when they take their focus off of the textarea. It's possible to do that with JavaScript but I need to use PHP to be able to do what Im planning to do...

And then in JavaScript..

var nonamevalue = document.getElementById("noname").value;

Is there a way to do the same JavaScript code above but using PHP?

Thank you!
I WANT TO DO SOMETHING LIKE THE LINK BELOW

https://signup.live.com/signup.aspx?ru=http%3a%2f%2fmail.live.com%2f%3frru%3dinbox&wa=wsignin1.0&rpsnv=10&ct=1227371507&rver=5.5.4177.0&wp=MBI&wreply=http:%2F%2Fmail.live.com%2Fdefault.aspx%3Fn%3D1487418728&id=64855&bk=1233100901&rollrs=12&lic=1

Go there and try typing in a username and then clicking on the background. It tells you right away if its available or not. I want to do that too. How?
 
Back
Top