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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:15:22+00:00 2026-06-05T13:15:22+00:00

I am creating a faq panel for there can be multiple answers for question

  • 0

I am creating a faq panel for there can be multiple answers for question and i want to take the answer id .because i am storing comment by answer id

the problem is that how to sent the $answer_id to the comment_submit_process.php and how to recognize the answer ?

$selected_ques= mysql_prep($_GET['ques']);
   $query = "SELECT * FROM formanswer where question_id = {$selected_ques}";
    $ans=  mysql_query($query);
    if($ans){
       while($answer = mysql_fetch_array($ans))  

           //here is the form  
        <form id="add-comment" action="comment_submit_process.php" >
         <textarea   class="comment-submit-textarea" cols="78" name="comment" style="height: 64px;"></textarea>
         <input type="submit" name="submitbutton" value="Add Comment" class="comment-submit-button"  >

         <br> <?php
         $ans_id= $answer['id'];  //i am fatching the $answer['id'] from database

         ?>

            <input type="hidden" name="ques" value="<?php echo $_GET['$ans_id'] ?>" />
         <span class="counter ">enter at least 15 characters</span>
         <span class="form-error"></span>
     </form>

<?php }} ?>
  • 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-05T13:15:23+00:00Added an answer on June 5, 2026 at 1:15 pm

    You might have typo here !! it should be..

    <input type="hidden" name="ques" value="<?php echo $ans_id; ?>" /> 
    

    Other thing, you can add get param to action link it self.

    <form id="add-comment" action="comment_submit_process.php?<?php echo $answer['id']; ?>" >
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an FAQ page where the answer is toggled by clicking on the
We are creating the FAQ section for our project. Each FAQ question has a
(creating a separate question after comments on this: Javascript redeclared global variable overrides old
This is kind of a silly question because most people ask the opposite such
I'm creating a self-help FAQ type application and one of the requirements is that
I would like to make a simple collapsible faq in wordpress. There are accordion
Creating a ruby on rails site and recently added: <% if (?can :manage, :table)
Creating my WordPress author.php template page and ran into a little roadblock. I want
Creating MVC3 Razor Helper like Helper.BeginForm() says that it can be done using extension
Creating function to print question, add choices to a list. def print_et_list (): answer_list

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.