Forums

PHP

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>
&lt;form method="POST" action="mailer.php"&gt;
&lt;p&gt; &lt;/p&gt;&lt;fieldset&gt;
&lt;p&gt;&lt;input type="radio" value="V1" checked name="R1"&gt;Value One (Checked By Default)&lt;/p&gt;
&lt;p&gt;&lt;input type="radio" name="R1" value="V2"&gt;Value Two&lt;/p&gt;
&lt;p&gt;&lt;input type="radio" name="R1" value="V3"&gt;Value Three&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;/fieldset&gt;
&lt;/form&gt;
</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

Reply to this topic