Code: Select all
'this is my code
Code: Select all
$myFile = "yourfile.js";
$information = $_POST['info'];
$fh = fopen($myFile, 'w') or die("can't open file");
$information = nl2br($information);
$information = str_replace("<br />","<br />'+", $information);
$insertinfo = "myText="."'<h5><center>".$information."</center></h5>'";
fwrite($fh, $insertinfo);
fclose($fh);
echo $information;Code: Select all
myText='<h5><center>this<br />'+'
is a test</center></h5>'Code: Select all
myText='<h5><center>this<br />'+
'is a test</center></h5>'Yuval