I have a table where users can insert info from a form. I want to have an ID # that distinguishes the posts.
Here is a simplified version of my table:
Email, Subject, Description, ID
When the user fills the info out i want to have them fill out the first three fields and I want the ID to automatically become 1 number larger than the id from the last entry into the table.
I know this has something to do with AUTO INCREMENT though im not sure exactly how this works.
Also:
$query = "INSERT INTO ads VALUES('$email' , '$subject', '$description', 'ID')";
when i execute this command do i need / want the ID or do i leave this out?
Here is a simplified version of my table:
Email, Subject, Description, ID
When the user fills the info out i want to have them fill out the first three fields and I want the ID to automatically become 1 number larger than the id from the last entry into the table.
I know this has something to do with AUTO INCREMENT though im not sure exactly how this works.
Also:
$query = "INSERT INTO ads VALUES('$email' , '$subject', '$description', 'ID')";
when i execute this command do i need / want the ID or do i leave this out?
Comment