I only want to do a function with an alert messagge in the following way:
I mean I want to validate a Username field, so I get the value from a DB with PHP and then I want to pass that value to a JS function,
eg.
$name= from a DB;
the form which I have to validate:
<form name=form method="post" onsubmit="return validate()">
....
....
how can I pass $name like a parameter in the validate() function? because "return validate(name)" doesn't work.