I want to create a simple database on my computer to help develop a help form--but am stuck at a fundamental MySQL issue. I am using XAMPP to begin with and want to say the following:
$connection=mysql_connect("localhost","",""); //yes, I want to work in a password and username free environment... I know the dangers
mysql_select_db("help",$connection); //help is the name of my database, help_issue is the name of my table in the help database
$query="UPDATE help_issue SET ID='NULL' First='$firstname' Last='$lastname' Badge='$badge' Phone='$phone' Email='$email' ComputerName='$computername' ComputerLocation='$computerlocation' Location='$location' Involves='$involves' Priority='$priority' Comments1='$comments' Comments2='$comments2' Assigned='$assigned' ";
mysql_query($query);
Is it possible to create a connection without a user and password? If not--how do I set one up in XAMPP? Any help would be greatly appreciated... I feel like beating my head into the wall at this point...
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
1 reply to this topic
#2
Posted 17 May 2011 - 04:33 PM
OliviaT, on 16 May 2011 - 07:58 PM, said:
Is it possible to create a connection without a user and password? If not--how do I set one up in XAMPP? Any help would be greatly appreciated... I feel like beating my head into the wall at this point...
No, it is not possible to create a connection without a username(as far as I know and my experience with databases concerned). But you can leave a password blank.
The default user for MySql database is root and password is blank (means no password).
So, if you have already created a database with the name help, then create a connection using root as username and password is empty string.
Ask me if you have any other doubts.
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














