Continuing update problem
Apologies if bad form to re-open an old thread but seems appropriate as it seems an identical problem and suggestions above don;t seem to have solved it for me.
I have a record update form which is more or less identical to the add record form (other than dynamic code and minor detail)
I open the update form in Dreamweaver 5.5 and create a record set.
Server behaviours, +, Web Assist, MySQLi, Data Management, MySQLi Update Record.
Trigger – Button: re_button pressed
Connection – PrioryTerrier
Update Table – registers
Lookup column – re_index (default value)
Column type – Integer (default value)
Lookup value - $_GET[‘re_index’} (default value)
After updating go to – list_register_record.php
Value = <?php echo((isset($_POST["re_register"]))?$_POST["re_register"]:"") ?>
Submit as Text, Blank value Db Default
Same (apart from field names) for re_period_from, re_period_to, re_location, and date_recorded
date_update has blank value set to Current Date
Testing the page at this stage allows me to correctly select an existing record but the update form does not show existing data but I can complete the fields and these are recorded, over writing the existing record if something new entered or leaving the initial value if nothing new entered in the field.
I then go back to programming and go through the form, selecting each field in turn and clicking the lightning bolt by Initial value in the Properties Inspector and selecting the matching name from the options shown under Form. This includes the hidden field.
Testing again results in the same as before – edit is possible but it is done “blind” as before as no past data is shown.
Because of replies above, I started again, this time first creating a Record set, then binding fields as appropriate, including binding the Id field to a hidden form element as suggested in the above forum thread.
That just digs a bigger hole for myself!
As you will gather, I don’t really know what I am doing when it comes to PHP and MySQL but know enough to have created bega.org.uk for the local church to save them £5000 for a commercial package which is worth it but we can’t afford.
I have attached the offending file!