Re: Complex escape string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Why exactly are you doing this? While variable-variables can be of use
at times, I don't think this is one of them. How do you use this newly
created variable.

- Craige

On Sat, May 3, 2008 at 1:20 PM, cyaugin <cyaugin@xxxxxxxxx> wrote:
> I have this line of code:
>
>  $q = "This is the string that will go into the query:
>  {${mysql_real_escape_string($_GET['searchstring'])}}";
>
>  What happens then is the user supplies 'foo' as the search string, and I get
>  a debug notice "Undefined variable: foo". Why is it treating the value as an
>  identifier and how do I make it do what I actually want it to do? This is on
>  PHP5, latest release.
>
>
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux