Email issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Email issue

Post by ianhull »

Hi Guys,

I have another little issue here, never used the mail function beofre and I tried this.

Code: Select all

<?php
$from = $_POST['sendersname'];
$dayphone = $_POST['phonenumber'];
$eveningphone =$_POST['eveningphone'];
$sendersemail = $_POST['fromemail'];
$message = $_POST['message'];
$interests = $_POST['selectbox'];
$myemail = "me@domain.com";
$subject = "MY SUBJECT";
mail($myemail, $subject, $message, $from, $interests, $sendersemail, $dayphone, $eveningphone);
?>
Here is my error:
Warning: mail() expects at most 5 parameters, 8 given

Can anyone help me configure this script so it will send all the contents.

Thanks in advance.
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Post by ianhull »

just had a thought.

would this work?


Code: Select all

$message = $dayphone . $eveningphone . $etc;
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

[SOLVED] Mail problem

Post by ianhull »

It worked.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

glad we could help :lol:
Post Reply