Thanks for the quick reply.
I tried that , but it didn't work.
In my contact.php page I have all code as functions. This is what triggers the functions;
The _submit_check is a hidden input value that simply tells me if form was submitted in case submit button was not clicked and form was sent via the return key.
if ($POST['submit_check']) {
// If validate_form( ) returns errors, pass them to show_form( )
$defaults = $_POST;
if ($form_errors = validate_form( )) {
show_form($form_errors);
} else {
process_form( );
}
} else {
$defaults = array('fname' => 'FirstName',
'lname' => 'LaststName',
'phone' => 'PhoneNo',
'city' => 'CityName',
'city_states' => array('CA','MI','WA','OH','MA'),
);
show_form( );
before your suggestion to use the curly braces I was trying to get the value using ; value="' . htmlentities($defaults['my_name']). '" as suggested in a book I'm reading, but this just makes the page go blank when I hit preview in my php editor (coda panic).