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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.