Hi Gavin,

Have you tried escaping your input? Take a look at the following:


It should help you take care of the problem.


php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com

On Thu, 2002-11-14 at 22:29, Gavin Amm wrote:
> Hi,
> I'm having some trouble storing html into a MySQL table, it is typed into a
> html 'textarea'.
> actually, i can't even get basic text to be stored from the textarea.
> the mysql_query() works fine with standard text input fields alone.
> i try and insert the textarea data in the same way as i do the text fields,
> but it doesn't work.
> i am trying to store the textarea data (html code typed into the textarea by
> a user) into a longtext SQL field atm. is that correct? i've heard a lot
> about storing non-standard data into blobs of recent...
> Is it because the textarea spans multiple lines and contains quote marks
> (amongst other characters that PHP or MySQL might not like...)?
> ...Would retrieving the data from the table be any different once i've got
> it in there?
> maybe i'd need to use mysql_fetch_array($result) instead of
> mysql_fetch_row($result) to get all of the data across?
> thanks guys,
> Gav
> This e-mail and any attachments are intended solely for the named addressee,
> are confidential and may contain legally privileged information. 
> The copying or distribution of them or of any information they contain, by
> anyone other than the addressee, is prohibited. If you received this e-mail
> in error, please notify us immediately by return e-mail or telephone +61 2
> 9413 2944 and destroy the original message. Thank you. 
> As Email is subject to viruses we advise that all Emails and any attachments
> should be scanned by an up to-date Anti Virus programme automatically by
> your system. It is the responsibility of the recipient to ensure that all
> Emails and any attachments are cleared of Viruses before opening. KSG can
> not accept any responsibility for viruses that maybe contained here in.
> Please advise KSG by return Email if you believe any Email sent by our
> system may contain a virus. It should be noted that most Anti Virus
> programmes can not scan encrypted file attachments (example - documents
> saved with a password). Thus extra care should be taken when opening these
> files. 
> Liability limited by the Accountants Scheme, approved under the Professional
> Standards Act 1994 (NSW). 
> Level 4 
> 54 Neridah Street                PO Box 1290 
> CHATSWOOD   NSW   2067           CHATSWOOD   NSW   2057 
> Ph: +61 2 9413 2944              Fax: +61 2 9413 9901
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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

Reply via email to