Forums
This topic is locked
PHP contact form problems
Posted 02 Feb 2007 15:27:28
1
has voted
02 Feb 2007 15:27:28 jason milburn posted:
Hello! I am having some problems with a monster contact form. It was working fine on my test server, but now I am getting errors and warnings on my clients server. I believe the problem is the PHP mailer file is messing up when not all the radio or checkboxes are checked. I'm still learning this type of coding - any help would be greatly appreciated!!!Here is the form: www.lvgraphics.net/quote.html
Here is the mailer PHP page: www.lvgraphics.net/mailer.php
thank you!!!
Replies
Replied 21 Feb 2007 22:10:32
21 Feb 2007 22:10:32 Oscar Valles replied:
Hey Jason,
You might want to begin by reviewing your HTML. Since you have different radio button groups, try grouping each radio button with fieldset tags.
For example:
<pre id=code><font face=courier size=2 id=code>
<form method="POST" action="mailer.php">
<p> </p><fieldset>
<p><input type="radio" value="V1" checked name="R1">Value One (Checked By Default)</p>
<p><input type="radio" name="R1" value="V2">Value Two</p>
<p><input type="radio" name="R1" value="V3">Value Three</p>
<p> </p></fieldset>
</form>
</font id=code></pre id=code>
Having default values checked may also help. When null values are applicable, simply create a new radio saying "Not Applicable" or whatever.
Tip #2
You might want to also try giving input names and ids different values such as:
name="NameOne" value="ValueOne"
and not
name="NameOne" value="NameOne"
I am pretty certain that will help eliminate some errors. The rest may lie in the way your are passing your HTML over - or - with the mailer script itself. I am not sure really.
If you have any other questions, just post. Also, I can script you a basic mailer for a pretty low price.
Oscar V.
Edited by - oval on 21 Feb 2007 22:14:04
You might want to begin by reviewing your HTML. Since you have different radio button groups, try grouping each radio button with fieldset tags.
For example:
<pre id=code><font face=courier size=2 id=code>
<form method="POST" action="mailer.php">
<p> </p><fieldset>
<p><input type="radio" value="V1" checked name="R1">Value One (Checked By Default)</p>
<p><input type="radio" name="R1" value="V2">Value Two</p>
<p><input type="radio" name="R1" value="V3">Value Three</p>
<p> </p></fieldset>
</form>
</font id=code></pre id=code>
Having default values checked may also help. When null values are applicable, simply create a new radio saying "Not Applicable" or whatever.
Tip #2
You might want to also try giving input names and ids different values such as:
name="NameOne" value="ValueOne"
and not
name="NameOne" value="NameOne"
I am pretty certain that will help eliminate some errors. The rest may lie in the way your are passing your HTML over - or - with the mailer script itself. I am not sure really.
If you have any other questions, just post. Also, I can script you a basic mailer for a pretty low price.
Oscar V.
Edited by - oval on 21 Feb 2007 22:14:04