Hi, please can someone help with a PHP error.
I am trying to get a form on my website up and running with a PHP script. I've tested a PHP file on the server (and checked with my host) and all is OK.
When I upload my script and form I get the error message below, does anyone know what I might me doing to cause this.
I did comment out the bottom section because I don't think I actually need them, I was getting the error before doing that anyway. I've also replaced website/e-mail addresses.
P.S. this is my first time using PHP.
Thanks in advance.
Error message:
Warning: mail() expects at most 5 parameters, 6 given in /vhost/vhost4/m/o/n/myaddress.co.uk/www/iopost.php on line 22
response=passed
PHP Script:
I am trying to get a form on my website up and running with a PHP script. I've tested a PHP file on the server (and checked with my host) and all is OK.
When I upload my script and form I get the error message below, does anyone know what I might me doing to cause this.
I did comment out the bottom section because I don't think I actually need them, I was getting the error before doing that anyway. I've also replaced website/e-mail addresses.
P.S. this is my first time using PHP.
Thanks in advance.
Error message:
Warning: mail() expects at most 5 parameters, 6 given in /vhost/vhost4/m/o/n/myaddress.co.uk/www/iopost.php on line 22
response=passed
PHP Script:
Code:
<?php //create short variable names $fullName=$_POST['fullName']; $fullAddress=$_POST['fullAddress']; $postcode=$_POST['postcode']; $telNumber=$_POST['telNumber']; $emailAddress=$_POST['emailAddress']; $fullName =trim($fullName); $fullAddress =trim($fullAddress); $postcode=StripSlashes($postcode); $telNumber =StripSlashes($telNumber); $emailAddress =StripSlashes($emailAddress); //modify the next line with your own email address $toaddress='myaddress@mail.co.uk'; mail($fullName,$fullAddress,$postcode,$telNumber,$emailAddress,"From: $fullName <$emailAddress >"); //clear the variables //$fullName=''; //$fullAddress=''; //$postcode=''; //$telNumber=''; //$emailAddress=''; //echo "response=passed"; ?>
Comment