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
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php