Looking for a way to... (PHP and MySQL Related)
Basically what I am trying to do, is this:
1. HTML Form contacts PHP with User, password, database name and Host.
2. PHP writes the data to a file stored on the server.
3. When needed, the code will be executed to connect to the MySQL Server using the details stored in the text file.
4. PHP Successfully connects to the MySQL database to insert new data (i.e tables).
This is what I have planned, or any more secure alternates would be great. I've tried looking at a way to code it, but to no avail. idk anymore. I need to be able to use an include file in some way that I can connect to a MySQL server at any given time - using the details given in a form, stored for later use.
do you require the complete solution or some help in this. I can provide you the all services or assistance if you require.
are you using a database on this site? that would be far more secure than a text file to store submitted usernames, passwords, etc..
Coding something to do what you're describing wouldn't be difficult, but what do you need it to do afterwards? Are you planning on entering SQL commands directly, or do you need php functions that will handle escaping, validation, display, etc.? If you need a lot of higher functions, you'd be better off using something like phpMyAdmin.