views:

35

answers:

2

Hi all,

I've got a LAMP site with a form that a user fills out. For some reason if viewing the returned form submission data on IE 7, it's inserting line breaks between each word. It's a pretty basic form with some input elements and a text area. If I submit the form with FF3+, IE8, or safari this isn't happening and everything looks fine. If a user submits the form with IE7, instead of "This is a description" I'm getting:
This
is
a
description.

I ajax submit the form data, then clean it up like so:

$description = mysql_real_escape_string(ucfirst($_POST['description']));
$description = stripslashes(trim($description));

Then update the table and display it with:

$description = stripslashes($description_data->description);.

The data in the table looks fine, no <br /> or \n tags to be seen. If I view the source, there are no breaks either, which really doesn't make sense.

I'm quite puzzled about this, and I'm not sure what else to try. Can anyone offer some guidance? Much thanks.

+1  A: 

May be \r ? how about trying $description=str_replace("\r","",$description); ?

S.Mark
A: 

If the data in the database is ok, then the problem is the css or html code, not ajax.

JUGO