Re: Inserting variables (Revised)

From: Date: Tue, 09 Oct 2001 15:37:57 +0000
Subject: Re: Inserting variables (Revised)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-70499@lists.php.net to get a copy of this message
post more code, I bet you have either $sqlquery = 'INSERT INTO mytable ("$q1", "$q2", "2001-10-09")'; or something strange like $sqlquery = "INSERT INTO mytable ('". $$q1 ."', '". $$q2 ."', '2001-10-09')"; post more code and we can see for sure. -- Chris Lee lee@mediawaveonline.com "Royw" <roydallas61@nospam.hotmail.com> wrote in message news:20011009143743.44640.qmail@pb1.pair.com... > 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 (#70499) next »