Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8674021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:36:12+00:00 2026-06-12T19:36:12+00:00

I am submitting a form which first enteres the data into db and then

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:36:14+00:00Added an answer on June 12, 2026 at 7:36 pm

    You can use a session variable, for example $_SESSION['log']:

    session_start();
    
    // ... 
    
    if (isset($_REQUEST['save'])) {
        $message = isset($_SESSION['log']) ? $_SESSION['log'] . '<br>' : '';
        $message .= "<strong>Logging Off at </strong> " . date("d F Y h:i:s A");
        // ...
        $_SESSION['log'] = $message;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am submitting from a form to another php page which is supposed to
I have a form which uses ajax for data submitting. Here is the html:
Say, you are submitting a form, which affects your database (adding records/ deleting them/
I've got a standard login form submitting data to a Codeigniter function to do
I want to make routing for form when submitting the form, $reportRoute = new
I have a form in HTML which contains multiple same name fields. For example:
I am creating a form which has many dynamic dropdown.. values selected in first
I have a form which contains among others: <form id=new_basic_ad class=new_basic_ad method=post enctype=multipart/form-data action=/basic_ads
Basically I have two forms The first form Is a simple select box which
I'm submitting a form but need my form to run some checks first so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.