Q:

AJAX connection with PHP file by XMLHttpRequest()

I want to control the answers in my form
I received this error: 

Notice: Undefined index: $y2,$y3,$y4,$y5,$y6,$y7,$y8,$y9,$y10 in  C:\Server...file.php on line 9,10,11,12,13,14,15,16,17

How to return "n" from PHP file?
HTML:

A:

The problem is this line:
xmlhttp.open("GET","file.php?y1="+x1+"$y2="+x2+"$y3="+x3+"$y4="+x4+"$y5="+x5+"$y6="+x6+"$y7="+x7+"$y8="+x8+"$y9="+x9+"$y10="+x10,true);

You're separating your GET parameters with $ instead of &, so it's all ending up as one big parameter y1, and hence y2-y10 are undefined.
You need to separate your parameters like so:
xmlhttp.open("GET","file.php?y1="+x1+"&y2="+x2+"&y3="+x3+"&y4="+x4+"&y5="+x5+"&y6="+x6+"&y7="+x7+"&y8="+x8+"&y9="+x9+"&y10="+x10,true);

