Here is what my database looks like…
MSG 0 ; ;
MSG 1 ; ;
MSG 2 ; ;
MSG 3 ; ;
My goal is to insert (append) a 40 char message to the empty column you see before you… The datafile is called message.txt and I want to insert it between the two semicolons in column 1
Here’s what I have with regards to inserting however it just dumps the info into a text file…
<?php
$companyfile = "message.txt";
if (isset($_POST['company'])) {
$newData = nl2br(htmlspecialchars($_POST['company']));
}
// ----------------------------
if (file_exists($companyfile)) {
$companyData = file_get_contents($companyfile);
}
?>
and from what I read I need to integrate this
file_put_contents($file, $content, FILE_APPEND);
but I can’t figure it out to do so… Can someone help me out? Thank you…