Jump to content

submiting form results


mynameis

Recommended Posts

Hi, new to the boards as seemed a good place to sign up for my php needs.

 

im looking for a bit of help understanding the syntax for my php file in a certain bit...but quite a vital bit.

 

so far i have my contact.php file emailing the results of my flash based contact form, but i am only getting one of the form fields being submitted, where i actually have 4 form fields.

 

This is a section of my php:

 

$subject="From ".$post_vars['your_name'][0] ;

 

$headers= "From: ".$post_vars['your_email'][0] ."\n";

 

$headers.='Content-type: text/html; charset=iso-8859-1';

 

$message='';

 

  while ($mess = current($post_vars)) {

 

  if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {

 

$message.=$mess[1].$mess[0].$headers[1].$headers[0]."<br>";

 

 

And i think it is on the bottom line that i need to make some change to [i noticed this is the line that gets submitted to my email as i also get the < br > tag in my email]

but i have tried adding what i thought was needed but when i change it i get errors and no email. if i leave it as shown i do get the email through but the only field i get sent is the 'message' field.

I also have a 'your_name' and 'your_email' fields - and would like to get these values send to me also.

 

Is there something i have missed that is easy to correct?

 

Id really appreciate any help with it

Link to comment
https://forums.phpfreaks.com/topic/100555-submiting-form-results/
Share on other sites

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.