Question: PHP A simple GuestBook to illustrate functions and file handling. My Guestbook Welcome to My Guestbook Please leave me a short note below

PHP A simple GuestBook to illustrate functions and file handling.

My Guestbook

Welcome to My Guestbook

Please leave me a short note below

$file = 'data/notes.txt';

addNote($note);

?>

The entries so far:

function addNote($note) {

global $file;

if (!empty($note)) {

$fp = fopen($file, 'a');

fputs($fp, nl2br($note) . "
");

fclose($fp);

}

}

function showNotes() {

// WRITE MISSING CODE HERE

}

?>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!