I have a JS prompt windows that appears within certain IF statement in PHP and I want the message typed in by the user to be held in a PHP variable so it can be submitted into a database.
The prompt will works so just confused as to how to store it to a PHP variable.
This is the JS code for the prompt box.
Any suggestion would be great, thanks.
The prompt will works so just confused as to how to store it to a PHP variable.
This is the JS code for the prompt box.
Code:
function failComment()
{
var x;
var comment=prompt("Please enter a comment as to why the test failed!","");
if (comment!=null)
{
x=comment;
}
}
Any suggestion would be great, thanks.