alphacooler
Programmer
I am an ultraNOOB...keep this in mind (i.e. speak to me like a child).
I have two tables
TABLE1 columns: ID, name, address, etc...
TABLE2 columns: ID, comments
I have a search page that brings up records.
Each record is a link to a "details page" and uses the URL to hold the Unique record ID
The details page has a "add comments" link which takes the user to another page. Call this page "update.php" In the url of update.php there is still ?recordID=4 (i.e. it still has the correct unique ID).
On update.php I have a simple form that has one comments field and a submit buton. My problem is trying to figure out how to INSERT the comments to TABLE2. Obviously the ID column in TABLE2 is not a unique primary key (I want to allow posting of multiple comments for the same ID).
I tried simply using a Hidden Field in the form for the ID, but that would only submit empty strings to my db for some reason.
Does anyone know of the best way to insert the ID from the URL into TABLE 2 along with comments?
I have two tables
TABLE1 columns: ID, name, address, etc...
TABLE2 columns: ID, comments
I have a search page that brings up records.
Each record is a link to a "details page" and uses the URL to hold the Unique record ID
The details page has a "add comments" link which takes the user to another page. Call this page "update.php" In the url of update.php there is still ?recordID=4 (i.e. it still has the correct unique ID).
On update.php I have a simple form that has one comments field and a submit buton. My problem is trying to figure out how to INSERT the comments to TABLE2. Obviously the ID column in TABLE2 is not a unique primary key (I want to allow posting of multiple comments for the same ID).
I tried simply using a Hidden Field in the form for the ID, but that would only submit empty strings to my db for some reason.
Does anyone know of the best way to insert the ID from the URL into TABLE 2 along with comments?