RE: [PHP] Scripting events with php
| From: | Jason Murray | Date: | Mon, 07 Jan 2002 04:52:39 +0000 |
| Subject: | RE: [PHP] Scripting events with php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-79657@lists.php.net to get a copy of this message | ||
> My problem is that I want to use events in my forms but I do not know how
to
> use php as a script for an event. Say I wanted to do something as simple
as
> (within a form): <input type="button" value="Test" onclick= <?php
> print
> 'testing, testin 123';?>>
>
> Essentially, when a click this button in a form it prints out testing.
PHP is a server-side script language. It does not get sent to the browser,
and browsers don't understand how to execute PHP code (for that precise
reason).
You want to do this with JavaScript, not PHP.
Jason