hello, i have written a php script to insert the contents of a text file into mysql database and the content of my file a.txt is
\n is used for a new line
i want it to be loaded into the database including the special character \n
as it is... But it is loading only " is used for a new line" kindly help me out... thanx
<?php
$filename = "a.txt";
$f = fopen($filename, 'r');
$total_contents = fread($f, filesize($filename));
print $total_contents;
mysql_connect("localhost", "datab_user", "password") or die(mysql_error());
mysql_select_db("datab_name") or die(mysql_error());
mysql_query("INSERT INTO table_name
(id,content) VALUES( 333,'$total_contents' ) ")
or die(mysql_error());
?>