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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:02:33+00:00 2026-05-15T20:02:33+00:00

i have a book form in which there is an ID field. i’d like

  • 0

i have a book form in which there is an ID field. i’d like the [disabled] textbox to display the ID from mysql when the user tries to fill the form.

it should check the database for the last id and accordingly display the next id. for example, if the last id entered is 8, then it should display to the new user- 9. how would i pre-generate the textbox to show the 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-15T20:02:33+00:00Added an answer on May 15, 2026 at 8:02 pm

    Make the id column in MySQL AUTO_INCREMENT so the id is increment automatically on every insert. Then get the inserted id through PDO::lastInsertId or mysql_insert_id. No need to display to the user.

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

Sidebar

Related Questions

I have a form which looks like this: Delete [Publisher One ] [] [Publisher
I have a class Book : from django.db import models from users.models import User
I'm using Struts2+Hibernate. I have a form in a JSP page, in which there
I have XML in the form: <Books> <Book> <Name>Lord of the Rings</Name> </Book> <Book>
I have a book app. User choose a book and UITextView show it. Every
I'm trying to handle a form which is quite complex for me... We have
There's a form on my site allowing to update an object (i.e. Book). The
I have an address book widget that shows if there are contents. If there
I have a form which is shared among some controllers. Sometimes I pass in
I am learning php and have a book which has lots of examples and

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.