Issues with adding form data to a database.....

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
MattSharp
Forum Commoner
Posts: 62
Joined: Wed Apr 24, 2002 2:25 pm

Issues with adding form data to a database.....

Post by MattSharp »

I have a problem when I try to paste a large amount of text from the web. It doesnt add the text to the database and I think it has something to do with the formatting in the text. When I paste the text in Word and auto format it so its Word standard and then paste it in, it works fine. But strictly pasting it does not work. Is this a known issue or is there a way to fix this? Thanks......
User avatar
sam
Forum Contributor
Posts: 217
Joined: Thu Apr 18, 2002 11:11 pm
Location: Northern California
Contact:

Post by sam »

Before doing the insert query make sure you run the text through the:

Code: Select all

addslashes();
function...

Cheers Moe
pozytron
Forum Newbie
Posts: 12
Joined: Fri May 03, 2002 7:14 pm
Location: Denver

Post by pozytron »

Where are you pasting the data? Are you using phpMyAdmin, or some other method? If you are pasting into a <textarea> on a web page, all formatting will be lost, but if you are using some sort of graphical front-end it is possible that the text retains its formatting, which would be your problem. If you are pasting directly into a php script then the above suggestion would be necessary.
Post Reply