07-30-2004, 03:23 AM
| THREAD STARTER
#1 (permalink)
|
| Senior Member Join Date: Jun 2004 Location: United Kingdom
Posts: 2,725
| Why the HELL won't this work ?????? I am getting really annoyed with PHP lately. I have wrote the code for a mail form using php and it won't work. Here is the code: PHP Code: <?php
$subj="FusionCre8 Starter Package order";
$to="wills_ebay@msn.com";
$msg="Name: ".$_POST['fname']." ".$_POST['lname']." \r \n Company/Site Name: ".$_POST['compname']." \r \n E-Mail Address: ".$_POST['email2']." \r \n Number of pages: ".$_POST['pno']." \r \n Number of graphics: ".$_POST['gno']." \r \n Hosting: ".$_POST['host']." \r \n Domain Name: ".$_POST['domname']." ".$_POST['domext']." \r \n About the site: ".$_POST['about']." \r \n Further Information: ".$_POST['furtinfo']." \r \n";
$header="From: ".$_POST['fname']." ".$_POST['lname'];
mail($to, $subj, $msg, $header);
header("Location: startthanks.htm");
?> And, if you need it, here is the HTML for my form (it's quite long):
| | Quote: |
<form name="form2" method="post" action="startmail.php">
<table width="501" cellspacing="0" cellpadding="0" class="text02" height="423">
<tr>
<td class="text02" height="30" width="134">First Name:</td>
<td class="text02" height="30" width="365">
<input type="text" name="fname"class="form">
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Last Name:</td>
<td class="text02" height="30" width="365">
<input type="text" name="lname" class="form">
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Name of Site\Company:</td>
<td class="text02" height="30" width="365">
<input type="text" name="compname" class="form">
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">E-Mail Address:</td>
<td class="text02" height="30" width="365">
<input type="text" name="email2" class="form">
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Number of pages:</td>
<td class="text02" height="30" width="365">
<select name="pno" class="form">
<option>-- Please Select --</option>
<option>1 page</option>
<option>2 pages</option>
<option>3 pages</option>
<option>Don't know</option>
</select>
</td> ????: NamePros.com http://www.namepros.com/programming/41106-why-the-hell-wont-this-work.html
</tr>
<tr>
<td class="text02" height="31" width="134">Number of graphics:</td>
<td class="text02" height="31" width="365">
<select name="gno" class="form">
<option>-- Please Select --</option>
<option>1 graphic</option>
<option>2 graphics</option>
<option>3 graphics</option>
<option>4 graphics</option>
<option>5 graphics</option>
<option>Don't know</option>
</select>
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Hosting:</td>
<td class="text02" height="30" width="365">
<select name="host" class="form">
<option>-- Please Select --</option> ????: NamePros.com http://www.namepros.com/showthread.php?t=41106
<option>Yes</option>
<option>No</option>
</select>
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Required domain
name:</td>
<td class="text02" height="30" width="365">www.
<input type="text" name="domname" class="form">
<select name="domext" class="form" style="width: 60px">
<option>.com</option>
<option>.co.uk</option>
<option>.org</option>
<option>.org.uk</option>
<option>.net</option>
<option>.biz</option>
<option>.info</option>
</select>
</td>
</tr>
<tr>
<td class="text02" height="95" valign="top" width="134">What
is your site about:</td>
<td class="text02" height="95" width="365" valign="top">
<textarea name="about" class="form" style="height: 80px; width: 200px"></textarea>
</td>
</tr>
<tr>
<td class="text02" height="48" valign="top" width="134">Further
information:</td>
<td class="text02" height="48" width="365" valign="top">
<p>
<textarea name="furtinfo" class="form" style="height: 80px; width: 200px"></textarea>
</p>
<p align="left">
<input type="submit" name="Submit" value="Order" class="form" style="width: 50px">
<input type="reset" name="Submit3" value="Reset" class="form" style="width: 60px">
</p>
</td>
</tr>
</table>
</form>
| Well, any ideas? |
| |