Anasta wrote:
I need this to change the value of the button 'sit in'  to the name of a
user --it doesnt work so anyone got any ideas or is what i am looking to do
impossible.

have you tried the [EMAIL PROTECTED] list? ;-)

(with kudos to John Nichel for the original 'psychic-db' comment which still
makes me laugh when I think about it)

Either the button name can show the username or a text field can change from
blank to show the username when clicked.


<FORM ACTION="<?=$PHP_SELF?>" METHOD="GET"> <INPUT TYPE="SUBMIT" VALUE="Sit in" onClick="JavaScript:showname('<?php echo $uname;?>');
        
the "JavaScript" is a give away that this is not a php question, go to a 
javascript
list (or maybe first try google) and ask them, don't forget to include
the definition of showname(), without it nobody can tell you why _it_ doesn't 
work.

btw:

1. from what I can tell what you want to do is far from impossible.
2. on the PHP side of things, you have to make sure that $uname does not
contain any unescaped single-quotes before echoing it (if you want to be sure
that you javascript will not throw an error due to a syntax error)

 return true;">
</FORM>




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



Reply via email to