jQuery is client side, PHP is server side. What exactly are you trying
to do? If you wish to call and use the return of a PHP function within
your jQuery code you will need to use the AJAX functions. However, if
you are already getting the variable $user before your jQuery is run
by the client you should just be able to do (in your Javascript):

<?php

$myuser = helloUser( $theuser ) ;

?>

<script language="Javascript" type="text/javascript">
var jQueryUser = <?php echo $myuser ?> ;
</script>

I think that will work. Good luck!

On Mar 5, 9:18 am, everdream <[EMAIL PROTECTED]> wrote:
> Hello !
> I have a php function : helloUser in the file : myFunctions.php.
> This is my function :
>
> ...
> function helloUser($user)
> {
>   return "Welcome $user !";}
>
> ...
>
> I'm using jquery for an application but i don't know how to call a php
> function and give parameter (here :$user) and recover the result (here :
> "welcome ...").
>
> Can somebody help me?
>
> Thanks a lot.
>
> --
> View this message in 
> context:http://www.nabble.com/calling-a-php-function-with-jquery-tp15853808s2...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to