Writing jQuery function in PHP file
<p>I've encountered a problem jQuery and PHP. I'm writing a jQuery function in my registration.php file, but it doesn't work.
This jQuery function is to control all the textbox via the checbox.</p>

<pre><code>&lt;script src="jquery.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function(){

$('#css').click(function(){
if (this.checked) {
$('#csc').removeAttr("disabled");
    $('#cse').removeAttr("disabled");
    $('#csp').removeAttr("disabled");
}
else {
$("#csc").attr("disabled", true);
    $("#cse").attr("disabled", true);
    $("#csp").attr("disabled", true);
}
});

$('#wrt').click(function(){
if (this.checked) {
$('#wsc').removeAttr("disabled");
    $('#wse').removeAttr("disabled");
    $('#wsp').removeAttr("disabled");
}
else {
$("#wsc").attr("disabled", true);
    $("#wse").attr("disabled", true);
    $("#wsp").attr("disabled", true);
}
});

$('#maths').click(function(){
if (this.checked) {
$('#msc').removeAttr("disabled");
    $('#mse').removeAttr("disabled");
    $('#msp').removeAttr("disabled");
}
else {
$("#msc").attr("disabled", true);
    $("#mse").attr("disabled", true);
    $("#msp").attr("disabled", true);
}
});

$('#sccb').click(function(){
if (this.checked) {
$('#ssc').removeAttr("disabled");
    $('#sse').removeAttr("disabled");
    $('#ssp').removeAttr("disabled");
}
else {
$("#ssc").attr("disabled", true);
    $("#sse").attr("disabled", true);
    $("#ssp").attr("disabled", true);
}
});

});

&lt;/script&gt;



&lt;table class="registration"&gt;
        &lt;tr&gt;
        &lt;td width="250"&gt;
        &lt;p style="font-color: black; font-size: 12px; margin-bottom: 1px"&gt;&lt;strong&gt;Subjects&lt;/strong&gt;&lt;/p&gt;
        &lt;/td&gt;
        &lt;td width="220"&gt;
        &lt;p style="font-color: black; font-size: 12px; margin-bottom: 1px"&gt;&lt;strong&gt;Full Name&lt;/strong&gt;&lt;/p&gt;
        &lt;/td&gt;
        &lt;td width="200"&gt;
        &lt;p style="font-color: black; font-size: 12px; margin-bottom: 1px"&gt;&lt;strong&gt;Email&lt;/strong&gt;&lt;/p&gt;
        &lt;/td&gt;
        &lt;td width="150"&gt;
        &lt;p style="font-color: black; font-size: 12px; margin-bottom: 1px"&gt;&lt;strong&gt;Phone Number&lt;/strong&gt;&lt;/p&gt;
        &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
        &lt;td&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td&gt;&lt;input type="checkbox" id="cscb" name="computerskills" value="computerskills"&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;img src="/wp-content/themes/twentyeleven/images/EATS/icas-subject-computerskills-icon.png"&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;p5&gt;Computer Skills&lt;/p5&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="csc" name="CScoor" disabled="disabled" size="30"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="cse" name="CS_email" disabled="disabled" size="27"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="csp" name="CS_phone" disabled="disabled"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;/tr&gt;

        &lt;tr&gt;
        &lt;td&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td&gt;&lt;input type="checkbox" name="writing" value="writing"&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;img src="/wp-content/themes/twentyeleven/images/EATS/icas-subject-english-icon.png"&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;p5&gt;English&lt;/p5&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;p5 style="font-size: 12px; font-weight: normal; color: #333333;"&gt; &amp; &lt;/p5&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;img src="/wp-content/themes/twentyeleven/images/EATS/icas-subject-writing-icon.png"&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;p5&gt;Writing&lt;/p5&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="wsc" name="Engcoor" disabled="disabled" size="30"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="wse" name="Eng_email" disabled="disabled" size="27"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="wsp" disabled="disabled" name="Eng_phone"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;/tr&gt;


        &lt;tr&gt;
        &lt;td&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td&gt;&lt;input type="checkbox" name="mathematics" value="mathematics"&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;img src="/wp-content/themes/twentyeleven/images/EATS/icas-subject-mathematics-icon.png"&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;p5&gt;Mathematics&lt;/p5&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="msc"name="Mcoor" disabled="disabled" size="30"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="mse" name="M_email" disabled="disabled" size="27"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="msp" disabled="disabled" name="M_phone"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;/tr&gt;

        &lt;tr&gt;
        &lt;td&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td&gt;&lt;input type="checkbox" id="sccb" name="science" value="science"&gt;&lt;/input&gt;

                    &lt;/td&gt;
                    &lt;td&gt;&lt;img src="/wp-content/themes/twentyeleven/images/EATS/icas-subject-science-icon.png"&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;p5&gt;Science&lt;/p5&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="ssc" name="Sccoor" disabled="disabled" size="30"&gt;&lt;/input&gt;
            &lt;/script&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="sse" name="Sc_email" disabled="disabled" size="27"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" id="ssp" name="Sc_phone" disabled="disabled"&gt;&lt;/input&gt;
        &lt;/td&gt;
        &lt;/tr&gt;


        &lt;/table&gt;
</code></pre>

<p>Why is that so? Please help, I'm still new to the programming world. Thanks.</p>

<p>I tried to save it as .html file it works, but it doesn't work with .php</p>
