I have two example strings, a name - 'SMITHJ' - and a short phrase -
'Town and Country' - which together uniquely identify a record on my
database. I concatenate them with a separating '&' to create a single
string identifier for the record - 'SMITHJ&Town and Country'.
I create a Form for my user, each line containing some identifying data
from a different database record, and a 'Submit' button (labelled
'Edit') named by an identifier as created above.
When the Form is processed, I determine which record the user wishes to
edit by checking the name of the pressed 'Edit' button.
When I 'explode' this name to its two constituent parts, I discover that
somewhere along the above process, 'Town and Country' has become
'Town_and_Count ry'. (I am using PHP5.)
Where and why has this happened?
Should I be prepared for any further character substitutions?
'Town and Country' - which together uniquely identify a record on my
database. I concatenate them with a separating '&' to create a single
string identifier for the record - 'SMITHJ&Town and Country'.
I create a Form for my user, each line containing some identifying data
from a different database record, and a 'Submit' button (labelled
'Edit') named by an identifier as created above.
When the Form is processed, I determine which record the user wishes to
edit by checking the name of the pressed 'Edit' button.
When I 'explode' this name to its two constituent parts, I discover that
somewhere along the above process, 'Town and Country' has become
'Town_and_Count ry'. (I am using PHP5.)
Where and why has this happened?
Should I be prepared for any further character substitutions?
Comment