Problems with mail form...

They have: 24 posts

Joined: Oct 2001

Quote: <? mail( "[email protected]", "Server Access Request", $ip, $name, $relation, "From: $email" ); header( "Location: http://www.dcdomain.org/r5/technology/submitted.htm" ); ?>

That's the code I'm using right now in the sendmail.php script. It worked before, but after I added one more field, the $relation field, it gives me this error:

Warning: Wrong parameter count for mail() in /usr/local/psa/home/vhosts/dcdomain.org/httpdocs/r5/technology/sendmail.php on line 1

Warning: Cannot add header information - headers already sent by (output started at /usr/local/psa/home/vhosts/dcdomain.org/httpdocs/r5/technology/sendmail.php:1) in /usr/local/psa/home/vhosts/dcdomain.org/httpdocs/r5/technology/sendmail.php on line 1

Is there a limit to the number of fields I can use in the script? I checked the form and all the field names are correct. Any ideas???

DC Domain r5

"What I had, I gave today.
What I saved, I lost forever."

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

PHP docs for mail().

syntax:
mail (to, subject, message [, additional_headers, [additional_parameters]])

I think what you may want is this:
mail("[email protected]", "Server Access Request", "$ip, $name, $relation", "From: $email" );

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 24 posts

Joined: Oct 2001

Came through again! Thanks for the help... working flawlessly now.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.