This is my form:
 <FORM NAME="answerform" METHOD=POST>
  Your name:<BR><INPUT TYPE=TEXT NAME="name" SIZE=20>
  Group:<BR><INPUT TYPE=TEXT NAME="group" SIZE=8>&nbsp;&nbsp;
  <INPUT TYPE=BUTTON VALUE=" OK!" onClick="Javascript:validate(this);">

and the function validate:
function validate() {
  var ok=true;
 if ('') {
  alert('Please write Your name');;
 if ('') {
  alert('What group?');;
 if (ok==true) {
  location.href='groups/collect_answer.php?name=<?php echo $name;
?>&group=<?php echo $group; ?>';
  return true;
 } else { return false; }

and this doesn't work and I can't see why not

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to