mike1290
11-09-2012, 12:02 PM
Hello,
I am having some problems with PHP code to send my form submissions to an email address: I have the following code at present,
mail($email, 'New Contact Us Form', $values['text'], "From: \"{$values['name']}\" <{$values['email']}>");
This produces an email but no data is shown on it. Can anyone help with how I need to adjust the code so that all fields from the contact form display on the resulting email.
The values for the fields I have in the form are: name, phone, email, comments.
Also, after the user submits my form, if there are uncompleted fields, the page is re-loaded with the form error messages. At the moment, the page re-loads to the top, however I would like it to re-load at the same position that the contact form sits. If it's possible, what code would I need to use?
Many Thanks
I am having some problems with PHP code to send my form submissions to an email address: I have the following code at present,
mail($email, 'New Contact Us Form', $values['text'], "From: \"{$values['name']}\" <{$values['email']}>");
This produces an email but no data is shown on it. Can anyone help with how I need to adjust the code so that all fields from the contact form display on the resulting email.
The values for the fields I have in the form are: name, phone, email, comments.
Also, after the user submits my form, if there are uncompleted fields, the page is re-loaded with the form error messages. At the moment, the page re-loads to the top, however I would like it to re-load at the same position that the contact form sits. If it's possible, what code would I need to use?
Many Thanks