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

  • Home
  • SEARCH
  • 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 5956849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:19:00+00:00 2026-05-22T18:19:00+00:00

I have an input tag inside a form as below I don’t know if

  • 0

I have an input tag inside a form as below

  • I don’t know if I should place the variable $id through the value property of the input tag
  • i don’t remember but I need that value to the URL so I can pick it up after form submission.

     <input type="hidden" id="parent_comment" name="comments" value="'.$id.'" /> 
    
  • 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-22T18:19:00+00:00Added an answer on May 22, 2026 at 6:19 pm

    That’s how you would embed a value in a form. If you want the value to be tamper-proof, then consider encrypting it somehow (http://php.net/mcrypt for one), so that it’s meaningless garbage on the client, but easily transformed back to a useful value on the server.

    You could store it in the session on the server, but if the user has multiple copies of the form open, the stored value would get stomped on and submitting form copy A would probably get copy B’s id value.

    As for retrieving the value, it’d be in $_GET['comments'] or $_POST['comments'], depending on how you submit the form.

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

Sidebar

Related Questions

I have a simple input field inside a form tag: <body> <form action=#> <label>Input</label>
In my HTML code, I have a form tag that contains two input boxes,
When I try to do things like <c:if ...>...</c:if> inside a form:input tag I
I have a <form> tag, and inside is a table width td's, and inside
I have a JSP form which is made of <input type=file/> tag alone for
I have the following: <form id=my_form> <input type=checkbox name=a value=a> Check <img src=... />
Possible Duplicate: Should I put input tag inside label tag? Is it valid to
i have this tag as input tag: <a href=controller.jsp?sid=127490C88DB5&R=35144 class=11-link-dkred-bold><b>Mr. John Q. Anderson&nbsp;&nbsp;&nbsp;MBA 1977
If I have a <input id=uploadFile type=file /> tag, and a submit button, how
I have dynamic page under {foreach} tag something like this. <div id=c1> {foreach} <input

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.