Re: PHP and MySQL query
| From: | Yasuo Ohgaki | Date: | Sat, 10 Mar 2001 07:07:45 +0000 |
| Subject: | Re: PHP and MySQL query | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43290@lists.php.net to get a copy of this message | ||
Read RFC2396 for URI format.
You are escaping query string as HTML where do you don't have to.
When you deal with query string, you should escape as URL.
Read PHP manual for rawurlencode()/rawurldecode() for URL encode/decode.
Regards,
Yasuo Ohgaki
----- Original Message -----
From: "Jim Ray" <jaray@relaypoint.net>
To: <php-general@lists.php.net>
Sent: Saturday, March 10, 2001 1:11 PM
Subject: [PHP] PHP and MySQL query
> I have a simpe query that I can not seem to get to work.
>
> Here is the HTML side:
> <td width="27%" align="center"><form
> action="luquery.php?DB=csjoa&TA=associates&SortField=company"
> method="post"><input type="text"
> name="search"><br><input
> type="submit"></form></td>
>
>
>
> Here is the PHP side:
>
> The fields are being past, but I get 0 in the results?
>
> $result=mysql_query("select * from $TA where $SortField='$search%' order
> by $SortField");
>
> Am I missing something here?
>
> Thanks for the help.
>
> Jim
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>