RE: [PHP] pass text variables to next page
| From: | Jasper Mulder | Date: | Tue, 09 Aug 2011 12:42:56 +0000 |
| Subject: | RE: [PHP] pass text variables to next page | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314442@lists.php.net to get a copy of this message | ||
> Date: Tue, 9 Aug 2011 07:30:47 -0500
> From: chrisstinemetz@gmail.com
> To: tamouse.lists@gmail.com
> CC: php-general@lists.php.net
> Subject: Re: [PHP] pass text variables to next page
>
> Thank you Tamara.
>
> Not sure if I am doing it right. It looks like the last single quote
> is being escaped.
> [SNIP]
> The query:
>
> $sql = "SELECT store_id, store_subject
> FROM stores
> WHERE store_subject = '" .
> mysql_real_escape_string($_GET['id']."'");
>
>
> Thank you,
>
> Chris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
The problem is with the mysql_real_escape_string closing parenthesis position, instead of
($_GET['id']."'");
it should be
($_GET['id'])."'";
HTH,
Jasper