Hi Dave, I could be wrong cause i am answering without running your code :
1) your mysql user account probably does not have grant privileges. good thing too. It's very dangerous to just run a grant query like this because it can so easily be abused by a malicious user. (of course you might have security measures in place which are not obvious to us because you have not posted that part of the code).
2) your variables should in the strictest sense be $_POST['f2'] etc.
all the best
Dave Carrera wrote:
$addamysqluser = mysql_query("grant select,insert,drop,update,delete,create,index,alter on $_POST[f2] to [EMAIL PROTECTED] IDENTIFIED by $_POST[f3]");
What is wrong with the above php based mysql_query ?
I am trying to add a user to mysql granting just the specified rights to table defined by the $_POST[f2] which is both the table and username and the password is defined by $_POST[f3].
This has been baffleing me for a couple of days now and any help given is very much appreciated.
Thank you in advance.
Yours Dave C
-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php