You are here: URGENT: Break-lines disappearing. « PHP « IT news, forums, messages
URGENT: Break-lines disappearing.

Posted by Bruno B B Magalhγes on 01/20/05 20:07

Hi you all,

I am having a very big problem... I have an article module in a system,
when an user creates an article it's parsed (as everything else in the
system) by an input class, after, it is checked for emptily and after
is build an insert query... But the break-lines just disappear... I've
tested right before parsing to the database build query function and
the breaks are there! And the build query function is this:

function insert_query($table='',$values='')
{
if($table != '' && $values != '')
{
foreach($values as $var=>$val)
{
$insert_vars[] = $var;
$insert_vals[] = $val;
}
return $this->query('INSERT INTO '.$table.'
('.implode(',',$insert_vars).') VALUES
(\''.implode('\',\'',$insert_vals).'\') ');
}
else
{
return false;
}
}

And the sanitize function is:

function sanitize($input_data, $sanitize = true)
{
if(is_array($input_data))
{
foreach($input_data as $input_key=>$input_value)
{
$output_data[$input_key] = $this->sanitize($input_value,$sanitize);
}
return $output_data;
}
elseif($sanitize)
{
return addslashes($input_data);
}
else
{
return $input_data;
}
}

Where are the break-lines?!?!? I am really desperate! Please! I am
using MySQL and PHP4.

Regards,
Bruno B B Magalhaes

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация