edg322 Posted November 17, 2006 Share Posted November 17, 2006 Question: can javascript pass variables to php? I don't know of a way, other than through some other medium such as changing the value of an html element or after submitting a form. Any other ideas about that? Link to comment https://forums.phpfreaks.com/topic/27592-can-javascript-pass-variables-to-php/ Share on other sites More sharing options...
taith Posted November 17, 2006 Share Posted November 17, 2006 the only other way of doing it, is by cookies, very effective i've found... Link to comment https://forums.phpfreaks.com/topic/27592-can-javascript-pass-variables-to-php/#findComment-126173 Share on other sites More sharing options...
ToonMariner Posted November 17, 2006 Share Posted November 17, 2006 JS works client side php works server side.JS can only send infomation to the server for php to pick up. There is really only one way it can do this.JS can manipulate fields in a html document and the results are sent via post or get methods to the server for the php engine to pick up.But JS can also send an xml request - which again is sending info via a url or post but the client 'does not' see this happening.this is how ajax works....They are essentially the same thing but you can achive very different effects with each. Link to comment https://forums.phpfreaks.com/topic/27592-can-javascript-pass-variables-to-php/#findComment-126176 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.