You are here: Re: [PHP] Submit name change « PHP « IT news, forums, messages
Re: [PHP] Submit name change

Posted by Jochem Maas on 05/02/05 11:30

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 psychic-javascript-gurus@example.com 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>
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация