RE: [PHP] Whats wrong with this query?

From: Date: Mon, 10 Nov 2003 16:52:41 +0000
Subject: RE: [PHP] Whats wrong with this query?
Groups: php.general 
Request: Send a blank email to php-general+get-169053@lists.php.net to get a copy of this message
Dave Carrera <mailto:dave@ephgroup.com> on Monday, November 10, 2003 8:45 AM said: > $addamysqluser = mysql_query("grant > select,insert,drop,update,delete,create,index,alter on $_POST[f2] to > $_POST[f2]@10.0.0.13 IDENTIFIED by $_POST[f3]"); > > What is wrong with the above php based mysql_query ? 1. What error are you getting? (This information should always be included in a "why isn't this working?" post.) 2. How do you know it's not working? 3. Assign your sql statement to a variable and then pass that variable to the mysql_query() function. Then echo the variable used to store the query and see if everything looks right to you. 4. Have you tried putting single quotes around the $_POST indexes? i.e. $_POST['f2'] 5. (I believe) You need to put { and } around your $_POST variables. i.e. {$_POST['f2']} HTH, Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/

« previous php.general (#169053) next »