I've written a php code where I need to save the data entered in a form to the mysql database.
For that I'm using the following $strSaveTD = "<input type = button id=btnSave value=Save onclick='checkform(" .$iMode. "," .$iLevel. ",1)'>"; When the user clicks on "Save" in IE it works fine - the data is saved and the user is redirected to updated view of the webpage. But when this webpage is accessed via other browsers like Firefox or Chrome the Save button simply doesn't work when I click it. What could be the problem

Whats with the lack of quotes on there? Try this:

$strSaveTD = "<input type=\"button\" id=\"btnSave\" value=\"Save\" onclick=\"checkform($iMode, $iLevel, 1)\">";

As long as you escape the quotes it will work, the above will print the code as you would expect it to be in HTML (without the backslashes)

onclick=\"checkform($iMode, $iLevel, 1)\"

That section of code will not work if you do not have javascript enabled. So make sure javascript is also enabled in Firefox and Crome