hello
What is happening is that when the page is first loaded, the radio button value is passed correctly and all elements are cleared successfully. If i then enter another entry, the radio button values are not passed to the processing php page. I have to refresh the browser and then the value is passed. (Firebug confirms this). I would be grateful if someone could check my code an point out the error that would cause this. I have pasted the code here:
http://jsfiddle.net/YY2cw/
but I am including the php page here that collects the radio button value. I cannot see where to attach at jsfiddle.net. Many thanks for your help.
contact-ajax.php
<?PHP
/*Get the posted values from our form*/
$name2=$_POST['name2'];
$position2=$_POST['positio
n2'];
$company2=$_POST['company2
'];
$email2=$_POST['email2'];
$phone2=$_POST['phone2'];
$contact2=$_POST['contact2
'];
$subject = "General Enquiry";
/*Clean posted values through mysql real escape string*/
/*$firstname=mysql_real_es
cape_strin
g($firstna
me);
$lastname=mysql_real_escap
e_string($
lastname);
$email=mysql_real_escape_s
tring($ema
il);
$emailr=mysql_real_escape_
string($em
ailr);
$pass=mysql_real_escape_st
ring($pass
);
$sex=mysql_real_escape_str
ing($sex);
$birthday_month=mysql_real
_escape_st
ring($birt
hday_month
);
$birthday_day=mysql_real_e
scape_stri
ng($birthd
ay_day);
$birthday_year=mysql_real_
escape_str
ing($birth
day_year);
*/
echo 1;
?>