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 6165585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:11:29+00:00 2026-05-23T22:11:29+00:00

I have a form as shown in PHP where user can build a quiz

  • 0

I have a form as shown in PHP where user can build a quiz by adding question and possible answers. User can add multiple answers by clicking Add Answer which just on more empty row .When Save is clicked I insert/edit question and answers.I am thinking whats best way to do this when question is edited?

1 . Delete all answers and Insert again. That way I dont have to check if any answer was modified or a new answer was added on client side.
2 . Add extra element title to textbox which will have answer id while a new question will have id blank. When user clicks save I will update all answers with id not blank . Insert all those with no id .

I am thinking to implement it as option 2 but is there any other better way ?

enter image description here

  • 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-05-23T22:11:29+00:00Added an answer on May 23, 2026 at 10:11 pm

    If you want to do this you can probably put information in your rel tag
    so if the item was modified you can put rel=”modified” and if it is a new item you can put rel=”new” and if the item is deleted you can put rel=”deleted” (and of course hide the deleted div instead of removing it).

    Once save is clicked you can build the proper query by going through the elements and checking their rel attribute.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a window containing a form (formPanel). Users can show this window clicking
I have a form in which people will be entering dollar values. Possible inputs:
I have a form element that contains multiple lines of inputs. Think of each
I have PHP code that is used to add variables to a session: <?php
I'm having a form in a .erb file, where the user can enter some
I have a page where I want to display a form if the user
I have a form for a user to change their settings. It has 5
I have a form that requires a physical address. Once the user enters the
I have a text box in an HTML form where the user will input
I have this form: <form name=customize> Only show results within <select name=distance id=slct_distance> <option>25</option>

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.