ØYstein HåLand wrote:
> 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;
> onClick="Javascript:validate(this);">  </FORM>
> and the function validate:
> function validate() {

[ CUT Javascript code ]

>   location.href='groups/collect_answer.php?name=<?php echo $name;
> ?>&group=<?php echo $group; ?>';

[ CUT Javascript code ]

At first I thought is was JavaScript/HTML code, but I can see a little bit
PHP now ;-))
The reason that it doens't work is simple. The variables are only available
AFTER posting the form. Not during validation!
You should just use Javascript to fill in the name and group into the URL.

Grtz Erwin

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to