Jump to content

[SOLVED] Concantinate phpvariable and javascript vaiable??


chanchelkumar

Recommended Posts

javascript can't directly interact with php, as it is client-side, whereas php is server-side.

One way though is to set a cookie (or session cookie) with javascript that the php file can then read.

 

Although if you're trying to use javascript to change an image then you could look into ajax. With ajax you can use javascript to access a file with variables attached (through get, or post).

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.