Re: Multiple word strings getting truncated - help please.
| From: | David Otton | Date: | Sat, 30 Aug 2003 22:23:31 +0000 |
| Subject: | Re: Multiple word strings getting truncated - help please. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161275@lists.php.net to get a copy of this message | ||
On Sat, 30 Aug 2003 14:52:30 -0700, you wrote:
>I have a form for a member to signup for an account. The form has standard
>fields for addresses, city state, etc. When I insert the data into the
>table, if the string has more than one word, it gets truncated to the first
>word.
>
>Does this sound like a PHP or a MySQL problem.
>
>Here's the code: (partial as the query is quite long)
Odd. Try this
$tr_addr1 = mysql_escape_string ($_POST['addr1']);
$query = "INSERT INTO subscribers (addr1) VALUES('$tr_addr1')";
echo ("$query<br>");
And tell us what you get. Then you at least know whether it's a MySQL
problem or an HTML/PHP problem.
Hmm. You are quoting your HTML attributes, right? That's the only thing I
can think of that even comes close to the behaviour you describe.