connect to mySQL database issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
data2009
Forum Newbie
Posts: 9
Joined: Mon Jun 29, 2009 4:05 pm

connect to mySQL database issue

Post 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);
?> 
 
 
Randwulf
Forum Commoner
Posts: 63
Joined: Wed Jan 07, 2009 7:07 am

Re: connect to mySQL database issue

Post 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.
data2009
Forum Newbie
Posts: 9
Joined: Mon Jun 29, 2009 4:05 pm

Re: connect to mySQL database issue

Post 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.
Randwulf
Forum Commoner
Posts: 63
Joined: Wed Jan 07, 2009 7:07 am

Re: connect to mySQL database issue

Post 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.
data2009
Forum Newbie
Posts: 9
Joined: Mon Jun 29, 2009 4:05 pm

Re: connect to mySQL database issue

Post 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.
Post Reply