Hi,
I'm rebuilding my website (www.yourtradeagent.com) with Dreamweaver 8 My form page adress is: www.yourtradeagent.com/contact.html
I have problems with it.
When I test it, it says "Warning: mail() expects at most 5 parameters, 9 given in /home/xncaaer/public_html/contact.php on line 12"
Here is my code
contact.html (just the form)
<form action="contact.php" method="post" name="contact_form" id="contact_form">
<table width="414" border="0" cellpadding="0" cellspacing="0" class="table1contact">
<tr>
<td height="26">Your name * </td>
<td><input name="name" type="text" id="Your name" size="35" /></td>
</tr>
<tr>
<td height="28">Your company </td>
<td><input name="company" type="text" id="Company" size="35" /></td>
</tr>
<tr>
<td>Industry </td>
<td><select name="industry">
<option>Consumer Products</option>
</select> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="27">Your e-mail * </td>
<td><input name="email" type="text" id="Your e-mail" size="35" /></td>
</tr>
<tr>
<td height="26">Confirm your e-mail * </td>
<td><input name="confemail" type="text" id="Confirm your e-mail" size="35" /></td>
</tr>
<tr>
<td height="26">Your phone number </td>
<td><input name="phone" type="text" id="phone" size="35" /></td>
</tr>
<tr>
<td width="149">Preffered language </td>
<td width="265"><select name="lang" id="lang">
<option>English</option>
<option>Español</option>
<option>Fraçais</option>
<option>Русский</option>
</select> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Your message * </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><textarea name="message" cols="45" rows="5" id="Your message"></textarea></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><input name="submit" type="submit" onclick="MM_validateForm('Your name','','R','Your e-mail','','RisEmail','Confirm your e-mail','','RisEmail','Your message','','R');return document.MM_returnValue" value=" Submit " />
<input name="Reset" type="reset" id="Reset" value=" Reset " /></td>
</tr>
</table>
</form>
contact.php
<?php
if (isset($_POST['submit']))
$recipient = "info@yourtradeagent.com";
$name = $_POST['name'];
$company = $_POST['company'];
$industry = $_POST['industry'];
$email = $_POST['email'];
$confemail = $_POST['confemail'];
$phone = $_POST['phone'];
$lang = $_POST['lang'];
$message = $_POST['message'];
mail($recipient, $name, $company, $industry, $email, $confemail, $phone, $lang, $message);
?>
It's a simple script but I still can't make it work well.
Do I have to set up testing server info in Dreamweaver, for now I've just set up the remote info (ftp, etc.). Could that be the problem?
Sorry if it obvious. Completely new to php.
Thank you
I'm rebuilding my website (www.yourtradeagent.com) with Dreamweaver 8 My form page adress is: www.yourtradeagent.com/contact.html
I have problems with it.
When I test it, it says "Warning: mail() expects at most 5 parameters, 9 given in /home/xncaaer/public_html/contact.php on line 12"
Here is my code
contact.html (just the form)
<form action="contact.php" method="post" name="contact_form" id="contact_form">
<table width="414" border="0" cellpadding="0" cellspacing="0" class="table1contact">
<tr>
<td height="26">Your name * </td>
<td><input name="name" type="text" id="Your name" size="35" /></td>
</tr>
<tr>
<td height="28">Your company </td>
<td><input name="company" type="text" id="Company" size="35" /></td>
</tr>
<tr>
<td>Industry </td>
<td><select name="industry">
<option>Consumer Products</option>
</select> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="27">Your e-mail * </td>
<td><input name="email" type="text" id="Your e-mail" size="35" /></td>
</tr>
<tr>
<td height="26">Confirm your e-mail * </td>
<td><input name="confemail" type="text" id="Confirm your e-mail" size="35" /></td>
</tr>
<tr>
<td height="26">Your phone number </td>
<td><input name="phone" type="text" id="phone" size="35" /></td>
</tr>
<tr>
<td width="149">Preffered language </td>
<td width="265"><select name="lang" id="lang">
<option>English</option>
<option>Español</option>
<option>Fraçais</option>
<option>Русский</option>
</select> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Your message * </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><textarea name="message" cols="45" rows="5" id="Your message"></textarea></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><input name="submit" type="submit" onclick="MM_validateForm('Your name','','R','Your e-mail','','RisEmail','Confirm your e-mail','','RisEmail','Your message','','R');return document.MM_returnValue" value=" Submit " />
<input name="Reset" type="reset" id="Reset" value=" Reset " /></td>
</tr>
</table>
</form>
contact.php
<?php
if (isset($_POST['submit']))
$recipient = "info@yourtradeagent.com";
$name = $_POST['name'];
$company = $_POST['company'];
$industry = $_POST['industry'];
$email = $_POST['email'];
$confemail = $_POST['confemail'];
$phone = $_POST['phone'];
$lang = $_POST['lang'];
$message = $_POST['message'];
mail($recipient, $name, $company, $industry, $email, $confemail, $phone, $lang, $message);
?>
It's a simple script but I still can't make it work well.
Do I have to set up testing server info in Dreamweaver, for now I've just set up the remote info (ftp, etc.). Could that be the problem?
Sorry if it obvious. Completely new to php.
Thank you
Comment