Form not Working getting error.

Hello guys, I am new to php. Started it 2 months ago along with html . my Code is not working i get the following code
" [14-Jun-2016 17:09:45 Africa/Johannesburg] PHP Warning: mail() expects at most 5 parameters, 7 given in /home/ojnl/public_html/php/form.php on line 16
" i dont knw where the problem is or what the error code mean.
here is my Php code - Please help.

<?php $first_name = $_post ["first_name"]; $surname_name = $_post ["surname_name"]; $cell_no = $_POST["cell_no"]; $company = $_POST["company"]; $email = $_POST["email"]; $subjects = $_POST["subject"]; $message = $_POST["message"]; $to = "[email protected]"; $subject = "$subjects"; mail ($to, $subject, $message, $company , $cell_no , $email, "New Client: " . $first_name . $last_name); echo " Your Message has been sent" ?>

and this is my html.

First name:

Surname name:

Cell No:

Company:

E-mail:
<input class="email" name="email" type="text" />

Subject:

Your message

<input name="reset" id="submit" type="reset" value="reset" />
<p> Thank you for taking your time to Get in Touch with Us. </p>
:) :) :) :) :) :) :) :)

Self explanatory, look at your mail function and count the parameters. Read the error message again.

LOL, yep!

And here is a link to explain that might help. And, on this site is a lot of tutorials for beginners…
http://www.w3schools.com/php/func_mail_mail.asp

Ennie thanks for the help.

Goitseone, no problem! That site is very helpful for programmers starting out. Next time, please place your code inside the PHP tags. Just above the typing area, press the PHP button and place your code inside the two tags. It helps us copy the code into our editors for easier reviewing. And, once you get further along with the new version, let us know if you solve it or if you need further help. That is what we are here for… Good luck with your code!

Sponsor our Newsletter | Privacy Policy | Terms of Service