Re: mysql_connect noob question
| From: | Stuart Dallas | Date: | Sun, 21 Apr 2013 22:37:05 +0000 |
| Subject: | Re: mysql_connect noob question | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320939@lists.php.net to get a copy of this message | ||
On 21 Apr 2013, at 22:43, Glob Design Info <info@globdesign.com> wrote:
> Except that a) I already have my form and script done, b) don't have time to learn
> phpMyAdmin, c) want to know why the script doesn't work as-is.
You have multiple database users who will need to do this, or just one database user? If just one
then it makes more sense to hard-code the username and password in the script and use something else
like HTTP authentication to protect the script from unauthorised users. Giving internal database
credentials to external users is generally a really really bad idea.
Also, consider the time it will take to learn phpMyAdmin (it's simple - install, use) against
the time it's taking to get your script working. The time you've spent developing the
script is already sunk so there's no point sinking more in an effort to make that already-sunk
time worthwhile.
Also, how well tested is your script? I don't know but I can say with absolute confidence that
phpMyAdmin has been tested far more.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
> On Apr 21, 2013, at 12:46 PM, David OBrien <dgobrien@gmail.com> wrote:
>
>> Not meaning to beat the proverbial dead horse
>>
>> I am developing a web portal that has to display the tables in the DB via a form/script.
The web page has a login with user and password. Right now I am just trying to connect.
>> This for a commercial app - the client wants both an API connect via PHP and a web portal
in which they can login from a web page and view the tables in the DB. Right now I am just trying to
get the form/PHP interaction to work.
>>
>> This sounds like a very good use statement for http://www.phpmyadmin.net/
>>
>> You can set it for http auth in the config ... they enter a mysql username and password and
they only see the databases and tables you want them to see
>>
>> Might be easier than reinventing the wheel and stressing all of us :)