Inserting variables (Revised)

From: Date: Tue, 09 Oct 2001 14:37:16 +0000
Subject: Inserting variables (Revised)
Groups: php.general 
Request: Send a blank email to php-general+get-70491@lists.php.net to get a copy of this message
From a form, I pass the variables "$q1" and $q2" I even print them to the screen to see that they have been passed properly. I also pass the following ATTEMPTS on an variable that is an SQL statement: INSERT INTO mytable ('$q1', '$q2', '2001-10-09') or INSERT INTO mytable ("$q1", "$q2", "2001-10-09") I have tried executing the SQL statement like this: $query = $sqlstatement; $result = MYSQL_QUERY($query); as well as $query = "$sqlstatement"; $result = MYSQL_QUERY($query); No matter what I get the values literally "q1" and "q2" sent to the table and NOT their respective values :-(

« previous php.general (#70491) next »