Jump to content

Variable Pass


EchoFool

Recommended Posts

Hey,

 

I have been trying to find a simple demo script for passing variables with ajax but to no avail any has really made any sense to me.

 

I was wondering if some one could simple show a crude example of how to send a variable from a php script to a different php script and return it.

 

For example:

 

PHP1 script:Send $Var to PHP2PHP2 script:

Assign to $Var2 do some processingSend $Var2 back to PHP1

 

Can some one please show me a simple example so i can fiddle with and learn from it.

 

Thanks

Link to comment
Share on other sites

Oh i did not know jquery did it also... which is easiest/server efficient (if the script in question is calling a php script every half a second)

 

To give idea of what im doing im trying to build a live chat with ajax (which is already working) as it calls a script which loads out the logs but currently it does not do any checks if there are new messages, as i only want it now to call if there are new messages which will add to server efficientcy.

 

EDIT: fixed typos.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.