Page 1 of 1

connect to mySQL database issue

Posted: Mon Jul 20, 2009 8:41 am
by data2009
When I browse my website with the following code, my firefox browser will ask me whether I want to save my password and username.
Is this not the proper way to connect to a database then? Why would firefox bother the user to save my login data. Anyone know what I do wrong?

Thanks.

Code: Select all

 
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
if (mysql_query("CREATE DATABASE my_db",$con))
  {
  echo "Database created";
  }
 
mysql_close($con);
?> 
 
 

Re: connect to mySQL database issue

Posted: Mon Jul 20, 2009 10:03 am
by Randwulf
It's not saving MySQL login info, but some other login info that you put in. Firefox is not able to see exchanges between a PHP script and the SQL DB.

Re: connect to mySQL database issue

Posted: Mon Jul 20, 2009 10:18 am
by data2009
Thanks for your reply.

My PHP script only do a connection with mySQL server, retrieve the data and display it on the screen. There is no other log-in details at all.
Why does firefox then still want to save my username and password? I don't think there are other info that it can saves.

Re: connect to mySQL database issue

Posted: Mon Jul 20, 2009 11:58 am
by Randwulf
That's odd. You can rest assured that it doesn't mean you have a DB security problem though. Firefox is physically unable to look at the DB connection info.

Re: connect to mySQL database issue

Posted: Tue Jul 21, 2009 4:38 pm
by data2009
Not really this pop-up window.

The pop-up bar is located just below the webaddress bar at the top of firefox. I can choose to save password, not this time or never for this site.