Ummm...no, that won't work.
For one gloriously simple reason.
He says he wants to send the info to a MySQL database, right?
So that means that he needs a *FORM* that contains those fields, so that he can SUBMIT that form.
But then the field
will *NEVER* be sent to MySQL.
Because *ONLY* fields with NAMES are sent by HTML to the server.
In other words, change
But there are other things wrong with the code. For starters, if the user clicks on the YES button first, the field is enabled. But if he then clicks on NO, the field *stays* enabled.
Also, presumably the PHP (or other server-side code) would like to *KNOW* which radio button was selected, so they each really need to have a value.
<form action="...some PHP page..." method="post" >
Do you have an account with us already?
<label><input name="hasAccount" type="radio" value="yes"
<label><input name="hasAccount" type="radio" value="no" checked
<i>If yes, enter your global account number.</i><br />
<i>If no, the field should grey out.</i>
<br /><br />
Global Account Number:<input name="accountID" disabled="disabled"/>
... other fields in the form ...
<input type="submit" value="Submit for processing" />