PHP is a server side script. You can't run it in a client's browser.
You can, however, run an AJAX query to a PHP page and get back data.
--
Jack Timmons
@_Codeacula
Trollfree: 8503290326
--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.
For information or project assistance please visit :
http://www.360psg.com
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professi...@googlegroups.com
To unsubscribe from this group, send email to Professional-P...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
rajendra prasad siva is not running PHP on the client side like the OP
requested.
rajendra prasad siva is writing a PHP function to echo out a string.
So, when he says:
<select name="select" onchange="check('<?php phpfun();?>'+this.value)">
And then below has this function:
function phpfun(){
echo 'Selected Value:';
}
He is basically doing:
<select name="select" onchange="check('<?php echo("Selected
Value");?>'+this.value)">
Which, as we all know, becomes:
<select name="select" onchange="check('Selected Value:'+this.value)">
So, when you run his script, you get this:
http://codeacula.net/really.php
View the source, and you will find absolutely no PHP.
But, Codeacula, that's not fair! Apache parses the PHP and doesn't let
the client give it a shot!
Oh yea?
http://codeacula.net/really.html
Broke, ain't it?
So, what you think, essentially, is wrong, and any of you who continue
debating that you can run PHP in a user's browser simply show only
that your knowledge of both PHP and how the Internet works is
absolutely -wrong-.
Is it possible, with extensions or special browsers, to run PHP on in
the browser, but I don't think something like that has been made yet,
I doubt it would pick up any popularity, and if it has been made it's
likely proprietary.
The OP wants PHP to run in the browser, from what this month old email
has gathered. If you can prove me wrong, do so, and I'll admit fault.
Otherwise, quit showing your ignorance of PHP, Javascript, and the
worldwide web, and let the topic die.
</evildreamsquashinggrognardofFUD>
--
Jack Timmons
@_Codeacula