general Posted January 27, 2007 Share Posted January 27, 2007 i'm writing a calendar code and all the php/mysql coding works great. but to make the calendar update without refreshing the whole page, i've made it so that javascript writes the php code into a div tag.Now, i dont know javascript very well. can one of u guys tell me how to pass variables from javascript to php? Link to comment https://forums.phpfreaks.com/topic/35936-help-pass-variables-from-javascript-to-php/ Share on other sites More sharing options...
jumpenjuhosaphat Posted January 27, 2007 Share Posted January 27, 2007 the php will run before the page loads, so writing php into a div tag using js wouldn't accomplish anything. You can pass variables by using hidden forms and giving their value with js, and then submitting the form to be handled by a php script. Link to comment https://forums.phpfreaks.com/topic/35936-help-pass-variables-from-javascript-to-php/#findComment-170481 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.