I've made a database using phpMyAdmin , now I want to make a register form for my site where peaple can register .I know how to work with input tags in HTML and I know how to insert data into a database but my problem is that I don't know how I can connect to the database that is already made in phpMyAdmin.
+2
A:
The database is a MySQL database, not a phpMyAdmin database. phpMyAdmin is only PHP code that connects to the DB.
mysql_connect('localhost', 'username', 'password') or die (mysql_error());
mysql_select_database('db_name') or die (mysql_error());
// now you are connected
Coronatus
2010-03-29 05:47:17
A:
Set up a user, a host the user is allowed to talk to MySQL by using (e.g. localhost), grant that user adequate permissions to do what they need with the database .. and presto.
The user will need basic CRUD privileges to start, that's sufficient to store data received from a form. The rest of the permissions are self explanatory, i.e. permission to alter tables, etc. Give the user no more, no less power than it needs to do its work.
Tim Post
2010-03-29 05:48:13
http://z.about.com/d/musiced/1/0/-/8/viola.jpgWhat permissions does one need to do what they need to with the viola?
Lotus Notes
2010-03-29 05:49:44
@byronh: The viola is used to keep sleepy stack overflow users from making typographical errors :)
Tim Post
2010-03-29 05:52:55