Hi - I am creating a simple PHP Task Request form that will post to an email address. I am fine with everything except one problem. I need this form to generate an ID number which will also display in the Subject line. If someone requests a task and it is number 001, then the next person to request a task using this form is number 002. I would need to have the form write to a database, so that the next number +1 can be generated based on the previous number in the database. Any help is greatly appreciated.
rgracey
0
Newbie Poster
Recommended Answers
Jump to PostBefore writing a next task to the database you read the last task. However, if the user has the form opened in the browser, there might be a problem displaying the current last inserted task ID, since many tasks could have been inserted after opening the form. You can use …
Jump to PostOK, I'll try to generate some steps I think would be appropriate and you then correct me where I might be wrong.
- A user visits a task request form (say get_task.php)
- The form action attribute is e.g. confirmed_task.php
- The user fills-in all the necessary information and submits the form
- The …
Jump to PostIf you get stuck just come back here with as specific question as possible. You might either continue here or mark this thread as solved and start a new one.
Jump to PostFor all the database manipulation nad testing it is a good idea to use some database GUI client. Many people use phpmyadmin, a web based client to mysql (mind you, some people hate it, but there are alternatives). I hope you use something like that.
Anyway you can insert first …
All 13 Replies
broj1
356
Humble servant
Featured Poster
rgracey
0
Newbie Poster
broj1
356
Humble servant
Featured Poster
rgracey
0
Newbie Poster
broj1
356
Humble servant
Featured Poster
rgracey
0
Newbie Poster
rgracey
0
Newbie Poster
broj1
356
Humble servant
Featured Poster
diafol
rgracey
0
Newbie Poster
diafol
lorenzoDAlipio
24
Junior Poster in Training
broj1
356
Humble servant
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.