<input type="hidden" name="h_id" value="$h_id"> will not work (at least for me...)
Hi all - In my add new record form I have a hidden text field that I'm trying to use to insert a value into my database. This numeric value is contained in the variable $h_id which came from a $SESSION variable. I checked and it exists. The error I get from MySQL on submit is telling me that I'm trying to save a text value into a number field. That means the value in the hidden field is not saving as a number but as text 'h_id' instead of the value of 1. Any idea of what I'm doing wrong here? I thought you could use variables in a hidden field.
This is the hidden field code:
<input type="hidden" name="h_id" value="$h_id">
Here is the MySQL error:
Cannot add or update a child row: a foreign key constraint fails (`outercircledb`.`cof_detail`, CONSTRAINT `FK_cof_detail` FOREIGN KEY (`h_id`) REFERENCES `cof_header` (`h_id`))
Regards,
Robert
