Jump to content

can someone tell me why my php code wont process


racercam

Recommended Posts

I reread it, you're right about it being in quotes, and I did criticize too quickly. However, although it's technically not incorrect, it is a source of confusion due to the inconsistency.

 

Now, in reply to the original poster, after using what you posted for the form markup, I can tell you that the problem your having is because you have an extra blank <form> element at the beginning. If you remove that from the markup, and then use the processing code exactly how I posted it, your form should work. I have tested this on a live server and received the email fine.

 

Thankyou! its now working perfect!

A more readable way of doing it would be to place the array variables within brackets inside the string.

 

e.g.:

 

$message = "Full Name: {$_POST['NAME']}\n
Address: {$_POST['ADDRESS']}\n
Town: {$_POST['TOWN']}\n
Post Code: {$_POST['POSTCODE']}\n
Phone Number: {$_POST['PHONE']}\n
Email: {$_POST['email']}\n\n";

 

It keeps things in a format most expect, and eliminates little squabbles like this one.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.