I am submitting a form which first enteres the data into db and then composes a message coming from the form fields. I want the functionality that if a user resubmits the form (2 or 3 times), there should be three messages composed in the same variable?
below is how i am creating my message variable
if(isset($_REQUEST['save'])){
$mesg = "<strong>Logging Off at </strong> " . date("d F Y h:i:s A");
$mesg .= "<BR><BR>";
$mesg .= "<strong>Project</strong>: " . $prj_name;
$mesg .= "<BR>";
$mesg .= "<strong>Deliverable</strong>: ". $dlvrbl_name;
$mesg .= "<BR>";
$mesg .= "<strong>Time spent</strong>: " . $time_spent;
$mesg .= "<BR>";
$mesg .= "<strong>Percentage</strong>: " . $percent . "%";
$mesg .= "<BR>";
$mesg .= "<strong>Comments</strong>: " . $comments;
$mesg .= "<BR><BR>";
$mesg .= "Regards,<BR>".$employee;
}
its working fine for the 1 time form submission, but what if i need 2 or 3 messages in the same variable?
thanks in advance
You can use a session variable, for example
$_SESSION['log']: