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
https://forums.phpfreaks.com/topic/206740-variable-pass/
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
https://forums.phpfreaks.com/topic/206740-variable-pass/#findComment-1081187
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.